might as well fix all bots

This commit is contained in:
Ben Harris committed 2018-10-05 13:56:15 -04:00
1 parent 464299a6af
commit 1019270dc2
6 files changed
+42 -42

No files matched your search

+6 -6
View File
@@ -56,8 +56,8 @@ def resetGlobals():
currentScores.clear()
def ping():
ircsock.send("PONG :pingis\n")
def ping(pong):
ircsock.send("PONG {}\n".format(pong))
def sendmsg(chan , msg):
ircsock.send("PRIVMSG "+ chan +" :"+ msg +"\n")
@@ -220,8 +220,8 @@ def listen():
ircmsg = ircsock.recv(2048)
ircmsg = ircmsg.strip('\n\r')
if ircmsg.find("PING :") != -1:
ping()
if ircmsg[:4] == "PING":
ping(ircmsg.split(" ")[1])
formatted = formatter.format_message(ircmsg)
@@ -254,8 +254,8 @@ def listen():
if ircmsg.find(":!rollcall") != -1:
rollcall(channel)
if ircmsg.find("PING :") != -1:
ping()
if ircmsg[:4] == "PING":
ping(ircmsg.split(" ")[1])
sys.stdout.flush()
time.sleep(1)