mirror of
https://github.com/RussellChamp/tilde-projects.git
synced 2026-10-28 00:22:34 +00:00
Merge pull request #2 from Marcus316/patch-2
Fix possible timing issue. Thanks ~marcus
This commit is contained in:
commit
ede88cf3bb
1 file changed
+9
-8
@@ -154,12 +154,13 @@ def listen():
|
||||
while 1:
|
||||
|
||||
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()
|
||||
|
||||
formatted = formatter.format_message(ircmsg)
|
||||
formatted = formatter.format_message(msg)
|
||||
|
||||
if "" == formatted:
|
||||
continue
|
||||
@@ -173,21 +174,21 @@ def listen():
|
||||
channel = split[3]
|
||||
messageText = split[4]
|
||||
|
||||
if ircmsg.find(":!tildescore") != -1:
|
||||
if msg.find(":!tildescore") != -1:
|
||||
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)
|
||||
elif challenges.has_key(user):
|
||||
challenge_response(channel, user, iTime, messageText)
|
||||
#give_tilde(channel, user, iTime)
|
||||
|
||||
if ircmsg.find(":!jackpot") != -1:
|
||||
if msg.find(":!jackpot") != -1:
|
||||
show_jackpot(channel)
|
||||
|
||||
if ircmsg.find(":!rollcall") != -1:
|
||||
if msg.find(":!rollcall") != -1:
|
||||
rollcall(channel)
|
||||
|
||||
if ircmsg.find("PING :") != -1:
|
||||
if msg.find("PING :") != -1:
|
||||
ping()
|
||||
|
||||
sys.stdout.flush()
|
||||
|
||||
Reference in new issue
Block a user