diff options
| author | 2019-01-25 18:59:00 +0000 | |
|---|---|---|
| committer | 2019-01-25 18:59:00 +0000 | |
| commit | 3c6827850a30c17b72fcc9817e22d55bd8d61b19 (patch) | |
| tree | 3eeb402d39e856fde1bc2c7cb3eae5718d606fb0 /modules/line_handler.py | |
| parent | Prevent 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.py | 6 |
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"]) |
