Services/plugin.py: Add some parens to ensure self.sentGhost is only used if it's not None.

This commit is contained in:
James Vega 2006-08-15 14:49:42 +00:00
parent 99630bc3f5
commit 4ee1437c40

View File

@ -148,8 +148,8 @@ class Services(callbacks.Plugin):
ghostDelay = self.registryValue('ghostDelay') ghostDelay = self.registryValue('ghostDelay')
if nick and nickserv and password and \ if nick and nickserv and password and \
not ircutils.strEqual(nick, irc.nick): not ircutils.strEqual(nick, irc.nick):
if irc.afterConnect and self.sentGhost is None or \ if irc.afterConnect and (self.sentGhost is None or
(self.sentGhost + ghostDelay) < time.time(): (self.sentGhost + ghostDelay) < time.time()):
if nick in irc.state.nicksToHostmasks: if nick in irc.state.nicksToHostmasks:
self._doGhost(irc) self._doGhost(irc)
else: else: