Only handle 324 when we're actually in the channel

This commit is contained in:
jesopo 2019-05-04 21:39:35 +01:00
parent 009daaeb62
commit dc17ef7bb9

View file

@ -113,11 +113,12 @@ def part(events, event):
server=event["server"])
def handle_324(event):
channel = event["server"].channels.get(event["args"][1])
modes = event["args"][2]
for mode in modes[1:]:
if mode in event["server"].channel_modes:
channel.add_mode(mode)
if event["args"][1] in event["server"].channels:
channel = event["server"].channels.get(event["args"][1])
modes = event["args"][2]
for mode in modes[1:]:
if mode in event["server"].channel_modes:
channel.add_mode(mode)
def handle_329(event):
channel = event["server"].channels.get(event["args"][1])