Skip to content

Commit 6a06ca9

Browse files
committed
core: Initialize list of bans when joining a channel.
1 parent 0418a44 commit 6a06ca9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/irclib.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,16 @@ def doJoin(self, irc, msg):
506506
self.channels[channel] = chan
507507
# I don't know why this assert was here.
508508
#assert msg.nick == irc.nick, msg
509+
if msg.nick == irc.nick:
510+
# Ask for the ban list
511+
for channel in msg.args[0].split(','):
512+
irc.queueMsg(ircmsgs.mode(channel, '+b'))
513+
514+
def do367(self, irc, msg):
515+
# Example:
516+
# :server 367 user #chan some!random@user evil!channel@op 1356276459
517+
state = self.channels[msg.args[1]]
518+
state.bans.add(msg.args[2])
509519

510520
def doMode(self, irc, msg):
511521
channel = msg.args[0]

0 commit comments

Comments
 (0)