mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 19:52:54 +01:00
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.""")))
|
||||
conf.registerGlobalValue(Services, 'ghostDelay',
|
||||
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',
|
||||
ValidNickOrEmptyString('NickServ', _("""Determines what nick the 'NickServ' service
|
||||
has.""")))
|
||||
|
@ -132,6 +132,8 @@ class Services(callbacks.Plugin):
|
||||
nickserv = self.registryValue('NickServ')
|
||||
password = self._getNickServPassword(nick)
|
||||
ghostDelay = self.registryValue('ghostDelay')
|
||||
if not ghostDelay:
|
||||
return
|
||||
if not nickserv or not password:
|
||||
s = 'Tried to ghost without a NickServ or password set.'
|
||||
self.log.warning(s)
|
||||
@ -160,6 +162,8 @@ class Services(callbacks.Plugin):
|
||||
nickserv = self.registryValue('NickServ')
|
||||
password = self._getNickServPassword(nick)
|
||||
ghostDelay = self.registryValue('ghostDelay')
|
||||
if not ghostDelay:
|
||||
return
|
||||
if nick and nickserv and password and \
|
||||
not ircutils.strEqual(nick, irc.nick):
|
||||
if irc.afterConnect and (self.sentGhost is None or
|
||||
|
Loading…
Reference in New Issue
Block a user