aboutsummaryrefslogtreecommitdiff
path: root/modules/line_handler.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-01-25 18:59:00 +0000
committerGravatar jesopo2019-01-25 18:59:00 +0000
commit3c6827850a30c17b72fcc9817e22d55bd8d61b19 (patch)
tree3eeb402d39e856fde1bc2c7cb3eae5718d606fb0 /modules/line_handler.py
parentPrevent users partaking in the lottery if doing so would put their coin total (diff)
signature
Remove users from channels they're kicked from (line_handler.py)
Diffstat (limited to 'modules/line_handler.py')
-rw-r--r--modules/line_handler.py6
1 files changed, 6 insertions, 0 deletions
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"])