mirror of https://github.com/Mikaela/Limnoria.git
Service: Don't ghost if ghostDelay is set to 0.
This commit is contained in:
parent
7c0e9c77d4
commit
e54ae6dc77
|
@ -83,7 +83,7 @@ conf.registerGlobalValue(Services, 'noJoinsUntilIdentified',
|
||||||
joining +r channels that won't allow you to join unless you identify.""")))
|
joining +r channels that won't allow you to join unless you identify.""")))
|
||||||
conf.registerGlobalValue(Services, 'ghostDelay',
|
conf.registerGlobalValue(Services, 'ghostDelay',
|
||||||
registry.PositiveInteger(60, _("""Determines how many seconds the bot will
|
registry.PositiveInteger(60, _("""Determines how many seconds the bot will
|
||||||
wait between successive GHOST attempts.""")))
|
wait between successive GHOST attempts. Set this to 0 to disable GHOST.""")))
|
||||||
conf.registerGlobalValue(Services, 'NickServ',
|
conf.registerGlobalValue(Services, 'NickServ',
|
||||||
ValidNickOrEmptyString('NickServ', _("""Determines what nick the 'NickServ' service
|
ValidNickOrEmptyString('NickServ', _("""Determines what nick the 'NickServ' service
|
||||||
has.""")))
|
has.""")))
|
||||||
|
|
|
@ -132,6 +132,8 @@ class Services(callbacks.Plugin):
|
||||||
nickserv = self.registryValue('NickServ')
|
nickserv = self.registryValue('NickServ')
|
||||||
password = self._getNickServPassword(nick)
|
password = self._getNickServPassword(nick)
|
||||||
ghostDelay = self.registryValue('ghostDelay')
|
ghostDelay = self.registryValue('ghostDelay')
|
||||||
|
if not ghostDelay:
|
||||||
|
return
|
||||||
if not nickserv or not password:
|
if not nickserv or not password:
|
||||||
s = 'Tried to ghost without a NickServ or password set.'
|
s = 'Tried to ghost without a NickServ or password set.'
|
||||||
self.log.warning(s)
|
self.log.warning(s)
|
||||||
|
@ -160,6 +162,8 @@ class Services(callbacks.Plugin):
|
||||||
nickserv = self.registryValue('NickServ')
|
nickserv = self.registryValue('NickServ')
|
||||||
password = self._getNickServPassword(nick)
|
password = self._getNickServPassword(nick)
|
||||||
ghostDelay = self.registryValue('ghostDelay')
|
ghostDelay = self.registryValue('ghostDelay')
|
||||||
|
if not ghostDelay:
|
||||||
|
return
|
||||||
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
|
||||||
|
|
Loading…
Reference in New Issue