Compare commits
2 Commits
e709a2ade1
...
1b252ca2c7
Author | SHA1 | Date | |
---|---|---|---|
1b252ca2c7 | |||
9aee38bc50 |
7
bert.py
7
bert.py
@ -280,11 +280,11 @@ def command_loop():
|
|||||||
if ircmsg.find("PING :") != -1:
|
if ircmsg.find("PING :") != -1:
|
||||||
pingstring = ircmsg.strip("PING :")
|
pingstring = ircmsg.strip("PING :")
|
||||||
ping(pingstring)
|
ping(pingstring)
|
||||||
elif ircmsg.find("ERROR :Closing link") != -1:
|
if ircmsg.find("ERROR :Closing link") != -1:
|
||||||
print("Error. Lost Connection. Giving up!")
|
print("Error. Lost Connection. Giving up!")
|
||||||
os._exit(1)
|
os._exit(1)
|
||||||
break
|
break
|
||||||
elif ircmsg.find(" PRIVMSG ") != -1:
|
if ircmsg.find(" PRIVMSG ") != -1:
|
||||||
ircnick = ircmsg.split("!")[0][1:]
|
ircnick = ircmsg.split("!")[0][1:]
|
||||||
channel = ircmsg.split(" PRIVMSG ", 1)[-1].split(" :", 1)[0]
|
channel = ircmsg.split(" PRIVMSG ", 1)[-1].split(" :", 1)[0]
|
||||||
msg = ircmsg.split(channel+" :", 1)[1]
|
msg = ircmsg.split(channel+" :", 1)[1]
|
||||||
@ -475,8 +475,7 @@ def command_loop():
|
|||||||
# say(channel, "blp")
|
# say(channel, "blp")
|
||||||
# except Exception as err:
|
# except Exception as err:
|
||||||
# print("could not blp - "+str(err))
|
# print("could not blp - "+str(err))
|
||||||
else:
|
|
||||||
print(f"Message not understood: {ircmsg}")
|
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
print(err)
|
print(err)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user