From 3c6827850a30c17b72fcc9817e22d55bd8d61b19 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 25 Jan 2019 18:59:00 +0000 Subject: [PATCH] Remove users from channels they're kicked from (line_handler.py) --- modules/line_handler.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/line_handler.py b/modules/line_handler.py index 63f29c5d..b6916d3d 100644 --- a/modules/line_handler.py +++ b/modules/line_handler.py @@ -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"])