This commit is contained in:
Nova Cat 2025-01-06 16:28:17 -08:00
parent 2959c72782
commit 6987e85a44

View file

@ -35,6 +35,8 @@ global caps
global shft
global connected
global nick
global socket
socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
nick = "kindle"
connected = False
caps = False
@ -58,8 +60,17 @@ def press(key:str):
input.xview_scroll(500, tk.UNITS)
def enter():
out = input.get()
if out == "":
pass
if out[0] == "/":
if out.split(" ")[0] == "/connect":
insert("\nNot implemented.")
elif out.split(" ")[0] == "/nick":
if len(out.split(" ")) == 2:
global nick
nick = out.split(" ")[1]
if not connected:
insert(f"Nickname changed to {nick}")
else:
if connected:
pass