irclib: Tag AWAY messages with channel names.

This commit is contained in:
Valentin Lorentz 2016-01-09 10:10:41 +00:00
parent d2fe7d901f
commit fee97c0308

View File

@ -675,6 +675,13 @@ class IrcState(IrcCommandDispatcher, log.Firewalled):
else:
assert False, msg.args[0]
def doAway(self, irc, msg):
channel_names = ircutils.IrcSet()
for (name, channel) in self.channels.items():
if msg.nick in channel.users:
channel_names.add(name)
msg.tag('channels', channel_names)
###
# The basic class for handling a connection to an IRC server. Accepts