mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-03 01:39:23 +01:00
Fixed a few bugs in the conversion from configurable to registry.
This commit is contained in:
parent
f0097c2257
commit
c9787b29f7
@ -104,7 +104,8 @@ class Services(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
self.log.warning('_doIdentify called without a set NickServ.')
|
self.log.warning('_doIdentify called without a set NickServ.')
|
||||||
return
|
return
|
||||||
password = self.registryValue('password', irc.network)
|
password = self.registryValue('password', irc.network)
|
||||||
assert irc.nick == self.nick, 'Identifying with not normal nick.'
|
assert irc.nick == self.registryValue('nick', irc.nick), \
|
||||||
|
'Identifying with not normal nick.'
|
||||||
self.log.info('Sending identify (current nick: %s)' % irc.nick)
|
self.log.info('Sending identify (current nick: %s)' % irc.nick)
|
||||||
identify = 'IDENTIFY %s' % password
|
identify = 'IDENTIFY %s' % password
|
||||||
# It's important that this next statement is irc.sendMsg, not
|
# It's important that this next statement is irc.sendMsg, not
|
||||||
@ -159,6 +160,11 @@ class Services(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
if msg.args[0] == nick:
|
if msg.args[0] == nick:
|
||||||
self._doIdentify(irc)
|
self._doIdentify(irc)
|
||||||
|
|
||||||
|
def _ghosted(self, irc, s):
|
||||||
|
r = re.compile(r'(Ghost|%s).*killed' %
|
||||||
|
self.registryValue('nick', irc.network))
|
||||||
|
return bool(r.search(s))
|
||||||
|
|
||||||
def doNotice(self, irc, msg):
|
def doNotice(self, irc, msg):
|
||||||
if irc.afterConnect:
|
if irc.afterConnect:
|
||||||
nickserv = self.registryValue('NickServ', irc.network)
|
nickserv = self.registryValue('NickServ', irc.network)
|
||||||
@ -167,7 +173,7 @@ class Services(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
nick = self.registryValue('nick', irc.network)
|
nick = self.registryValue('nick', irc.network)
|
||||||
self.log.debug('Notice received from NickServ: %r', msg)
|
self.log.debug('Notice received from NickServ: %r', msg)
|
||||||
s = msg.args[1]
|
s = msg.args[1]
|
||||||
if self._ghosted.search(s):
|
if self._ghosted(irc, s):
|
||||||
self.log.info('Received "GHOST succeeded" from NickServ')
|
self.log.info('Received "GHOST succeeded" from NickServ')
|
||||||
self.sentGhost = False
|
self.sentGhost = False
|
||||||
irc.queueMsg(ircmsgs.nick(nick))
|
irc.queueMsg(ircmsgs.nick(nick))
|
||||||
|
Loading…
Reference in New Issue
Block a user