From d2dbb0a249df98730271cd4229a29152d3ca4297 Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 30 Jan 2019 21:06:02 +0000 Subject: [PATCH] Add private message `unban` command (channel_op.py) --- modules/channel_op.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/channel_op.py b/modules/channel_op.py index adcf2c80..b1d29bfd 100644 --- a/modules/channel_op.py +++ b/modules/channel_op.py @@ -167,6 +167,16 @@ class Module(ModuleManager.BaseModule): except UserNotFoundException as e: event["stderr"].write(str(e)) + @utils.hook("received.command.unban", private_only=True, min_args=2) + """ + :help: Unban a user/hostmask from the current channel + :usage: + :require_access: ban + :channel_arg: 0 + """ + channel = event["server"].channels.get(event["args_split"][0]) + self._ban(event["server"], channel, False, event["args_split"][1]) + @utils.hook("received.command.unban", channel_only=True, min_args=1) def unban(self, event): """