Remove users from channels they're kicked from (line_handler.py)

This commit is contained in:
jesopo 2019-01-25 18:59:00 +00:00
parent 45f47bc3fc
commit 3c6827850a

View file

@ -636,7 +636,13 @@ class Module(ModuleManager.BaseModule):
target_user = event["server"].get_user(target)
self._event(event, "kick", channel=channel, reason=reason,
target_user=target_user, user=user, server=event["server"])
channel.remove_user(target_user)
target_user.part_channel(channel)
if not len(target_user.channels):
event["server"].remove_user(target_user)
else:
event["server"].channels.remove(channel)
self.events.on("self.kick").call(channel=channel, reason=reason,
user=user, server=event["server"])