fix bot not being able to connect to some strange networks

This commit is contained in:
jacob1 2015-10-04 00:14:23 -04:00
parent da762e6d73
commit 0ac28c290b

View File

@ -30,6 +30,9 @@ def on_privmsg(cli, rawnick, chan, msg, notice = False):
try: try:
getattr(var, "CASEMAPPING") getattr(var, "CASEMAPPING")
except AttributeError: except AttributeError:
# some kind of hack for strange networks which don't put server name in some of the NOTICEs on startup
if not rawnick:
return
if notice and "!" not in rawnick and chan in ("*", "AUTH"): if notice and "!" not in rawnick and chan in ("*", "AUTH"):
# On-connect message before RPL_ISUPPORT is sent. # On-connect message before RPL_ISUPPORT is sent.
return return