mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Changed got376 to afterConnect.
This commit is contained in:
parent
a551c32267
commit
c922957655
@ -69,7 +69,6 @@ class Services(privmsgs.CapabilityCheckingPrivmsg):
|
||||
self.reset()
|
||||
|
||||
def reset(self):
|
||||
self.got376 = False
|
||||
self.sentGhost = False
|
||||
self.identified = False
|
||||
|
||||
@ -124,7 +123,6 @@ class Services(privmsgs.CapabilityCheckingPrivmsg):
|
||||
self.sentGhost = False
|
||||
|
||||
def do376(self, irc, msg):
|
||||
self.got376 = True
|
||||
if self.nickserv: # Check to see if we're started.
|
||||
assert self.nick, 'Services: Nick must not be empty.'
|
||||
if irc.nick == self.nick:
|
||||
@ -136,7 +134,7 @@ class Services(privmsgs.CapabilityCheckingPrivmsg):
|
||||
do422 = do377 = do376
|
||||
|
||||
def do433(self, irc, msg):
|
||||
if self.nickserv and self.got376:
|
||||
if self.nickserv and irc.afterConnect:
|
||||
self._doGhost(irc)
|
||||
else:
|
||||
self.log.warning('do433 called without plugin being started.')
|
||||
|
@ -420,7 +420,7 @@ class Irc(IrcCommandDispatcher):
|
||||
self._nickmods = copy.copy(conf.nickmods)
|
||||
self.lastTake = 0
|
||||
self.server = None
|
||||
self.got376 = False
|
||||
self.afterConnect = False
|
||||
self.fastqueue = smallqueue()
|
||||
self.lastping = time.time()
|
||||
self.outstandingPing = False
|
||||
@ -437,7 +437,7 @@ class Irc(IrcCommandDispatcher):
|
||||
self.state.reset()
|
||||
self.queue.reset()
|
||||
self.server = None
|
||||
self.got376 = False
|
||||
self.afterConnect = False
|
||||
self.lastping = time.time()
|
||||
self.outstandingPing = False
|
||||
self.fastqueue = queue()
|
||||
@ -491,7 +491,7 @@ class Irc(IrcCommandDispatcher):
|
||||
else:
|
||||
self.lastTake = now
|
||||
msg = self.queue.dequeue()
|
||||
elif now > (self.lastping + conf.pingInterval) and self.got376:
|
||||
elif now > (self.lastping + conf.pingInterval) and self.afterConnect:
|
||||
if self.outstandingPing:
|
||||
s = 'Reconnecting to %s, ping not replied to.' % self.server
|
||||
log.warning(s)
|
||||
@ -552,7 +552,8 @@ class Irc(IrcCommandDispatcher):
|
||||
self.outstandingPing = False
|
||||
|
||||
def do376(self, msg):
|
||||
self.got376 = True
|
||||
self.afterConnect = True
|
||||
do377 = do422 = do376
|
||||
|
||||
def do433(self, msg):
|
||||
"""Handles 'nickname already in use' messages."""
|
||||
|
Loading…
Reference in New Issue
Block a user