mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Fix for bug #893264; we can now discover what channels require registration and only go after we've identified.
This commit is contained in:
parent
d9f1c47fba
commit
ac74ef9819
@ -173,7 +173,7 @@ class Services(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
return
|
return
|
||||||
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].lower()
|
||||||
if self._ghosted(irc, 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
|
||||||
@ -190,6 +190,9 @@ class Services(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
self.identified = True
|
self.identified = True
|
||||||
if self.channels:
|
if self.channels:
|
||||||
irc.queueMsg(ircmsgs.joins(self.channels))
|
irc.queueMsg(ircmsgs.joins(self.channels))
|
||||||
|
elif 'incorrect' in s:
|
||||||
|
log = 'Received "Password Incorrect" from NickServ.'
|
||||||
|
self.log.warning(log)
|
||||||
|
|
||||||
def getops(self, irc, msg, args):
|
def getops(self, irc, msg, args):
|
||||||
"""[<channel>]
|
"""[<channel>]
|
||||||
|
21
src/Admin.py
21
src/Admin.py
@ -80,8 +80,7 @@ class Admin(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
def do471(self, irc, msg):
|
def do471(self, irc, msg):
|
||||||
try:
|
try:
|
||||||
channel = msg.args[1]
|
channel = msg.args[1]
|
||||||
(irc, msg) = self.joins[channel]
|
(irc, msg) = self.joins.pop(channel)
|
||||||
del self.joins[channel]
|
|
||||||
irc.error('Cannot join %s, it\'s full.' % channel)
|
irc.error('Cannot join %s, it\'s full.' % channel)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
self.log.debug('Got 471 without Admin.join being called.')
|
self.log.debug('Got 471 without Admin.join being called.')
|
||||||
@ -89,8 +88,7 @@ class Admin(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
def do473(self, irc, msg):
|
def do473(self, irc, msg):
|
||||||
try:
|
try:
|
||||||
channel = msg.args[1]
|
channel = msg.args[1]
|
||||||
(irc, msg) = self.joins[channel]
|
(irc, msg) = self.joins.pop(channel)
|
||||||
del self.joins[channel]
|
|
||||||
irc.error('Cannot join %s, I was not invited.' % channel)
|
irc.error('Cannot join %s, I was not invited.' % channel)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
self.log.debug('Got 473 without Admin.join being called.')
|
self.log.debug('Got 473 without Admin.join being called.')
|
||||||
@ -98,8 +96,7 @@ class Admin(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
def do474(self, irc, msg):
|
def do474(self, irc, msg):
|
||||||
try:
|
try:
|
||||||
channel = msg.args[1]
|
channel = msg.args[1]
|
||||||
(irc, msg) = self.joins[channel]
|
(irc, msg) = self.joins.pop(channel)
|
||||||
del self.joins[channel]
|
|
||||||
irc.error('Cannot join %s, it\'s banned me.' % channel)
|
irc.error('Cannot join %s, it\'s banned me.' % channel)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
self.log.debug('Got 474 without Admin.join being called.')
|
self.log.debug('Got 474 without Admin.join being called.')
|
||||||
@ -107,12 +104,20 @@ class Admin(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
def do475(self, irc, msg):
|
def do475(self, irc, msg):
|
||||||
try:
|
try:
|
||||||
channel = msg.args[1]
|
channel = msg.args[1]
|
||||||
(irc, msg) = self.joins[channel]
|
(irc, msg) = self.joins.pop(channel)
|
||||||
del self.joins[channel]
|
|
||||||
irc.error('Cannot join %s, my keyword was wrong.' % channel)
|
irc.error('Cannot join %s, my keyword was wrong.' % channel)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
self.log.debug('Got 475 without Admin.join being called.')
|
self.log.debug('Got 475 without Admin.join being called.')
|
||||||
|
|
||||||
|
def do515(self, irc, msg):
|
||||||
|
try:
|
||||||
|
channel = msg.args[1]
|
||||||
|
(irc, msg) = self.joins.pop(channel)
|
||||||
|
irc.error('Cannot join %s, I\'m not identified with the nickserv.'
|
||||||
|
% channel)
|
||||||
|
except KeyError:
|
||||||
|
self.log.debug('Got 515 without Admin.join being called.')
|
||||||
|
|
||||||
def doJoin(self, irc, msg):
|
def doJoin(self, irc, msg):
|
||||||
if msg.prefix == irc.prefix:
|
if msg.prefix == irc.prefix:
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user