版本比较
新一代极简聊天室——FireTalk
正文
增加 7 行删除 3 行
84 行未改动8586878889899091929365 行未改动15916016116216316316416516616716716816917017117217317417517617717817918018184 行未改动 continue if msg.strip() in ["style_one", "style_two"]: CURRENT_STYLE = msg.strip() client_socket.send(msg.encode('utf-8')) print_with_style(f"✅ 本地样式已切换为:{CURRENT_STYLE}") print_with_style(f" 本地样式已切换为:{CURRENT_STYLE}") continue client_socket.send(msg.encode('utf-8')) except Exception as e: print_with_style(f" FireTalk发送失败:{str(e)}")65 行未改动```:::
## 使用方法:将 `chat.py` 保存后放在桌面(一定要命名为 `chat.py`),然后打开 `cmd`。输入 `cd Desktop`,再输入 `python chat.py server`。将 `chat.py` 保存后放在桌面(一定要命名为 `chat.py`,一定要放在桌面),然后打开 `cmd`。输入 `cd Desktop`,再输入 `python chat.py server`。
随后将这个页面最小化。
在打开一个 `cmd`。在这个 `cmd` 中输入 `cd Desktop`。随后再输入 `python chat.py client 127.0.0.1`(IP 脆弱)。这样就建了一个客户端。再打开一个 `cmd`。在这个 `cmd` 中输入 `cd Desktop`。随后再输入 `python chat.py client 127.0.0.1`(IP 脆弱)。这样就建了一个客户端。
想要进多少个人,就建几个客户端。
如果要退出,在客户端按 `Ctrl + C`。关闭房间则在第一个 `cmd` 按 `Ctrl + C`。
---
页面有些丑陋,但易上手。
展示图:
感谢大家使用。