mirror of
https://github.com/RussellChamp/tilde-projects.git
synced 2026-10-28 00:22:34 +00:00
Fix possible timing issue
This commit is contained in:
1 parent
5bd1f60a0b
commit
8fdd2ce027
1 file changed
+9
-8
@@ -154,12 +154,13 @@ def listen():
|
|||||||
while 1:
|
while 1:
|
||||||
|
|
||||||
ircmsg = ircsock.recv(2048)
|
ircmsg = ircsock.recv(2048)
|
||||||
ircmsg = ircmsg.strip('\n\r')
|
for msg in ircmsg.split('\n'):
|
||||||
|
msg = msg.strip('\n\r')
|
||||||
|
|
||||||
if ircmsg.find("PING :") != -1:
|
if msg.find("PING :") != -1:
|
||||||
ping()
|
ping()
|
||||||
|
|
||||||
formatted = formatter.format_message(ircmsg)
|
formatted = formatter.format_message(imsg)
|
||||||
|
|
||||||
if "" == formatted:
|
if "" == formatted:
|
||||||
continue
|
continue
|
||||||
@@ -173,21 +174,21 @@ def listen():
|
|||||||
channel = split[3]
|
channel = split[3]
|
||||||
messageText = split[4]
|
messageText = split[4]
|
||||||
|
|
||||||
if ircmsg.find(":!tildescore") != -1:
|
if msg.find(":!tildescore") != -1:
|
||||||
show_tildescore(channel, user)
|
show_tildescore(channel, user)
|
||||||
elif ircmsg.find(":!tilde") != -1 and not challenges.has_key(user):
|
elif msg.find(":!tilde") != -1 and not challenges.has_key(user):
|
||||||
challenge(channel, user, iTime)
|
challenge(channel, user, iTime)
|
||||||
elif challenges.has_key(user):
|
elif challenges.has_key(user):
|
||||||
challenge_response(channel, user, iTime, messageText)
|
challenge_response(channel, user, iTime, messageText)
|
||||||
#give_tilde(channel, user, iTime)
|
#give_tilde(channel, user, iTime)
|
||||||
|
|
||||||
if ircmsg.find(":!jackpot") != -1:
|
if msg.find(":!jackpot") != -1:
|
||||||
show_jackpot(channel)
|
show_jackpot(channel)
|
||||||
|
|
||||||
if ircmsg.find(":!rollcall") != -1:
|
if msg.find(":!rollcall") != -1:
|
||||||
rollcall(channel)
|
rollcall(channel)
|
||||||
|
|
||||||
if ircmsg.find("PING :") != -1:
|
if msg.find("PING :") != -1:
|
||||||
ping()
|
ping()
|
||||||
|
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|||||||
Reference in new issue
Block a user