update
This commit is contained in:
parent
2959c72782
commit
6987e85a44
1 changed files with 13 additions and 2 deletions
11
kindirc.py
11
kindirc.py
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue