Bug fix: Receive ChanServ NOTICEs in chat

This commit is contained in:
Kiooeht 2011-06-08 23:51:16 -07:00
parent 02126c3e23
commit f5973a7652

3
irc.py
View file

@ -258,8 +258,7 @@ class PesterHandler(DefaultCommandHandler):
msg = msg.decode('iso-8859-1', 'ignore') msg = msg.decode('iso-8859-1', 'ignore')
handle = nick[0:nick.find("!")] handle = nick[0:nick.find("!")]
logging.info("---> recv \"NOTICE %s :%s\"" % (handle, msg)) logging.info("---> recv \"NOTICE %s :%s\"" % (handle, msg))
if handle == "ChanServ": if handle == "ChanServ" and chan == self.parent.mainwindow.profile().handle and msg[0:2] == "[#":
if chan == self.parent.mainwindow.profile().handle and msg[0:2] == "[#":
self.parent.memoReceived.emit(msg[1:msg.index("]")], handle, msg) self.parent.memoReceived.emit(msg[1:msg.index("]")], handle, msg)
else: else:
self.parent.noticeReceived.emit(handle, msg) self.parent.noticeReceived.emit(handle, msg)