mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 11:12:47 +01:00
Added proper NICK handling to IrcState
This commit is contained in:
parent
534c367b89
commit
68440bd83a
@ -73,7 +73,7 @@ class IrcCallback(object):
|
||||
method = getattr(self, commandName)
|
||||
try:
|
||||
method(irc, msg)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
debug.recoverableException()
|
||||
s = 'Exception raised by %s.%s' % \
|
||||
(self.__class__.__name__, method.im_func.func_name)
|
||||
@ -224,6 +224,15 @@ class IrcState(object):
|
||||
channel = msg.args[1].lower()
|
||||
chan = self.channels[channel]
|
||||
chan.topic = msg.args[2]
|
||||
elif msg.command == 'NICK':
|
||||
newNick = msg.args[0]
|
||||
for channel in self.channels.itervalues():
|
||||
chan = self.channels[channel]
|
||||
for s in (chan.users, chan.ops, chan.halfops, chan.voices):
|
||||
if msg.nick in s:
|
||||
s.remove(msg.nick)
|
||||
s.add(newNick)
|
||||
|
||||
|
||||
def getTopic(self, channel):
|
||||
return self.channels[channel.lower()].topic
|
||||
|
Loading…
Reference in New Issue
Block a user