Skip to content
Browse files

Squelch echoed messages from partychat.

karmabot echoes things back under some circumstances, and maybe other
things, too.
  • Loading branch information...
1 parent b5aaaec commit 936251fc4b927ee11c1c788d01ee061b2b124154 @nelhage committed Oct 1, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 party-zephyr.py
View
4 party-zephyr.py
@@ -62,6 +62,10 @@ def callback_message(self, conn, mess):
return
m = CHAT_MESSAGE.search(body)
if m:
+ if who == 'z':
+ # If we get a message from ourself echoed back,
+ # squelch it.
+ return
who = m.group(1)
body = m.group(2)
from_jabber_q.put((chat, who, body))

0 comments on commit 936251f

Please sign in to comment.
Something went wrong with that request. Please try again.