mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-10 12:59:22 +01:00
Services: Improve error on missing password or NickServ nick
This commit is contained in:
parent
fffdd82571
commit
06c88581ec
@ -124,9 +124,11 @@ class Services(callbacks.Plugin):
|
||||
return
|
||||
nickserv = self.registryValue('NickServ', network=irc.network)
|
||||
password = self._getNickServPassword(nick, irc.network)
|
||||
if not nickserv or not password:
|
||||
s = 'Tried to identify without a NickServ or password set.'
|
||||
self.log.warning(s)
|
||||
if not nickserv:
|
||||
self.log.warning('Tried to identify without a NickServ set.')
|
||||
return
|
||||
if not password:
|
||||
self.log.warning('Tried to identify without a password set.')
|
||||
return
|
||||
assert ircutils.strEqual(irc.nick, nick), \
|
||||
'Identifying with not normal nick.'
|
||||
@ -150,16 +152,15 @@ class Services(callbacks.Plugin):
|
||||
ghostDelay = self.registryValue('ghostDelay', network=irc.network)
|
||||
if not ghostDelay:
|
||||
return
|
||||
if not nickserv or not password:
|
||||
s = 'Tried to ghost without a NickServ or password set.'
|
||||
self.log.warning(s)
|
||||
if not nickserv:
|
||||
self.log.warning('Tried to ghost without a NickServ set.')
|
||||
return
|
||||
if not password:
|
||||
self.log.warning('Tried to ghost without a password set.')
|
||||
return
|
||||
if state.sentGhost and time.time() < (state.sentGhost + ghostDelay):
|
||||
self.log.warning('Refusing to send GHOST more than once every '
|
||||
'%s seconds.' % ghostDelay)
|
||||
elif not password:
|
||||
self.log.warning('Not ghosting: no password set.')
|
||||
return
|
||||
else:
|
||||
self.log.info('Sending ghost (current nick: %s; ghosting: %s)',
|
||||
irc.nick, nick)
|
||||
|
Loading…
Reference in New Issue
Block a user