core: Initialize list of bans when joining a channel.

This commit is contained in:
Valentin Lorentz 2012-12-23 17:19:25 +01:00
parent 0418a44d2a
commit 6a06ca9911

View File

@ -506,6 +506,16 @@ class IrcState(IrcCommandDispatcher):
self.channels[channel] = chan
# I don't know why this assert was here.
#assert msg.nick == irc.nick, msg
if msg.nick == irc.nick:
# Ask for the ban list
for channel in msg.args[0].split(','):
irc.queueMsg(ircmsgs.mode(channel, '+b'))
def do367(self, irc, msg):
# Example:
# :server 367 user #chan some!random@user evil!channel@op 1356276459
state = self.channels[msg.args[1]]
state.bans.add(msg.args[2])
def doMode(self, irc, msg):
channel = msg.args[0]