Remove users from channels they're kicked from (line_handler.py)
This commit is contained in:
parent
45f47bc3fc
commit
3c6827850a
1 changed files with 6 additions and 0 deletions
|
@ -636,7 +636,13 @@ class Module(ModuleManager.BaseModule):
|
||||||
target_user = event["server"].get_user(target)
|
target_user = event["server"].get_user(target)
|
||||||
self._event(event, "kick", channel=channel, reason=reason,
|
self._event(event, "kick", channel=channel, reason=reason,
|
||||||
target_user=target_user, user=user, server=event["server"])
|
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:
|
else:
|
||||||
|
event["server"].channels.remove(channel)
|
||||||
self.events.on("self.kick").call(channel=channel, reason=reason,
|
self.events.on("self.kick").call(channel=channel, reason=reason,
|
||||||
user=user, server=event["server"])
|
user=user, server=event["server"])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue