Fix for bug #893264; we can now discover what channels require registration and only go after we've identified.

This commit is contained in:
Jeremy Fincher 2004-02-10 03:48:56 +00:00
parent 71d0b0343a
commit d9f1c47fba
1 changed files with 7 additions and 0 deletions

View File

@ -91,6 +91,7 @@ class Services(privmsgs.CapabilityCheckingPrivmsg):
self.reset()
def reset(self):
self.channels = []
self.sentGhost = False
self.identified = False
@ -151,6 +152,10 @@ class Services(privmsgs.CapabilityCheckingPrivmsg):
else:
self.log.warning('do433 called without NickServ being set.')
def do515(self, irc, msg):
# Can't join this channel, it's +r (we must be identified).
self.channels.append(msg.args[1])
def doNick(self, irc, msg):
nick = self.registryValue('nick', irc.network)
if msg.args[0] == nick:
@ -183,6 +188,8 @@ class Services(privmsgs.CapabilityCheckingPrivmsg):
elif 'now recognized' in s:
self.log.info('Received "Password accepted" from NickServ')
self.identified = True
if self.channels:
irc.queueMsg(ircmsgs.joins(self.channels))
def getops(self, irc, msg, args):
"""[<channel>]