fix str-concat during in except blocks

This commit is contained in:
jkhsjdhjs 2024-01-30 22:58:08 +00:00
parent 1b252ca2c7
commit f449305ccd

16
bert.py
View File

@ -75,7 +75,7 @@ def connect(host, port):
try:
irc.connect((host, port))
except Exception as err:
print("Connection failed! "+err)
print("Connection failed! "+str(err))
def sendRaw(data):
@ -87,7 +87,7 @@ def register(nick, host):
try:
sendRaw("USER "+nick+" "+host+" "+nick+" "+nick+"\n")
except Exception as err:
print("Failed! "+err)
print("Failed! "+str(err))
def name(nick):
@ -95,7 +95,7 @@ def name(nick):
try:
sendRaw("NICK "+nick+"\n")
except Exception as err:
print("Failed! "+err)
print("Failed! "+str(err))
def auth(nick, password):
@ -111,7 +111,7 @@ def join(chan):
try:
sendRaw("JOIN "+chan+"\n")
except Exception as err:
print("Failed! "+err)
print("Failed! "+str(err))
def mode(nick):
@ -119,7 +119,7 @@ def mode(nick):
try:
sendRaw("MODE "+nick+" +B-x\n")
except Exception as err:
print("Failed! "+err)
print("Failed! "+str(err))
def part(chan):
@ -135,7 +135,7 @@ def say(chan, msg):
sendRaw("PRIVMSG "+chan+" :"+msg+"\n")
print("OK")
except Exception as err:
print("Error: "+err)
print("Error: "+str(err))
def raw(msg):
@ -150,7 +150,7 @@ def me(chan, msg):
try:
sendRaw("PRIVMSG "+chan+" :\u0001ACTION "+msg+"\u0001\n")
except Exception as err:
print("Error: "+err)
print("Error: "+str(err))
def getData():
@ -269,7 +269,7 @@ def start(host, port, nick, password, chans):
join(chan)
sleep(2)
except Exception as err:
print("FAIL: "+err)
print("FAIL: "+str(err))
def command_loop():