mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
plugins/Services: Make ghostDelay configurable with a default of 60 seconds.
This commit is contained in:
parent
c3cacbce76
commit
9214f6ac87
@ -71,12 +71,14 @@ conf.registerGlobalValue(Services, 'disabledNetworks',
|
|||||||
Networks(['QuakeNet'], """Determines what networks this plugin will be
|
Networks(['QuakeNet'], """Determines what networks this plugin will be
|
||||||
disabled on."""))
|
disabled on."""))
|
||||||
|
|
||||||
conf.registerGlobalValue(Services,
|
conf.registerGlobalValue(Services, 'noJoinsUntilIdentified',
|
||||||
'noJoinsUntilIdentified',
|
|
||||||
registry.Boolean(False, """Determines whether the bot will not join any
|
registry.Boolean(False, """Determines whether the bot will not join any
|
||||||
channels until it is identified. This may be useful, for instances, if
|
channels until it is identified. This may be useful, for instances, if
|
||||||
you have a vhost that isn't set until you're identified, or if you're
|
you have a vhost that isn't set until you're identified, or if you're
|
||||||
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',
|
||||||
|
registry.PositiveInteger(60, """Determines how many seconds the bot will
|
||||||
|
wait between successive GHOST attempts."""))
|
||||||
conf.registerGlobalValue(Services, 'NickServ',
|
conf.registerGlobalValue(Services, 'NickServ',
|
||||||
ValidNickOrEmptyString('', """Determines what nick the 'NickServ' service
|
ValidNickOrEmptyString('', """Determines what nick the 'NickServ' service
|
||||||
has."""))
|
has."""))
|
||||||
|
@ -40,8 +40,6 @@ import supybot.ircutils as ircutils
|
|||||||
import supybot.schedule as schedule
|
import supybot.schedule as schedule
|
||||||
import supybot.callbacks as callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
ghostDelay = 60
|
|
||||||
|
|
||||||
class Services(callbacks.Plugin):
|
class Services(callbacks.Plugin):
|
||||||
"""This plugin handles dealing with Services on networks that provide them.
|
"""This plugin handles dealing with Services on networks that provide them.
|
||||||
Basically, you should use the "password" command to tell the bot a nick to
|
Basically, you should use the "password" command to tell the bot a nick to
|
||||||
@ -117,6 +115,7 @@ class Services(callbacks.Plugin):
|
|||||||
return
|
return
|
||||||
nickserv = self.registryValue('NickServ')
|
nickserv = self.registryValue('NickServ')
|
||||||
password = self._getNickServPassword(nick)
|
password = self._getNickServPassword(nick)
|
||||||
|
ghostDelay = self.registryValue('ghostDelay')
|
||||||
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)
|
||||||
@ -146,6 +145,7 @@ class Services(callbacks.Plugin):
|
|||||||
return
|
return
|
||||||
nickserv = self.registryValue('NickServ')
|
nickserv = self.registryValue('NickServ')
|
||||||
password = self._getNickServPassword(nick)
|
password = self._getNickServPassword(nick)
|
||||||
|
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 \
|
||||||
|
Loading…
Reference in New Issue
Block a user