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