diff --git a/plugins/Services/config.py b/plugins/Services/config.py index f9272f583..4fe36bc05 100644 --- a/plugins/Services/config.py +++ b/plugins/Services/config.py @@ -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."""))) diff --git a/plugins/Services/plugin.py b/plugins/Services/plugin.py index 66764b30d..21450e46c 100644 --- a/plugins/Services/plugin.py +++ b/plugins/Services/plugin.py @@ -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