瀏覽代碼

Fix NickServ auth with protected nicks.

tags/v0.3
Ben Kurtovic 8 年之前
父節點
當前提交
e4509b9ed5
共有 1 個檔案被更改,包括 3 行新增0 行删除
  1. +3
    -0
      earwigbot/irc/frontend.py

+ 3
- 0
earwigbot/irc/frontend.py 查看文件

@@ -87,6 +87,8 @@ class Frontend(IRCConnection):
elif line[1] == "NOTICE":
data = Data(self.nick, line, msgtype="NOTICE")
if self._auth_wait and data.nick == self.NICK_SERVICES:
if data.msg.startswith("This nickname is registered."):
continue
self._auth_wait = False
sleep(2) # Wait for hostname change to propagate
self._join_channels()
@@ -99,6 +101,7 @@ class Frontend(IRCConnection):
except KeyError:
self._join_channels()
else:
self.logger.debug("Identifying with services")
msg = "IDENTIFY {0} {1}".format(username, password)
self.say(self.NICK_SERVICES, msg, hidelog=True)
self._auth_wait = True


Loading…
取消
儲存