aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2019-01-30 21:06:02 +0000
committerGravatar jesopo2019-01-30 21:06:02 +0000
commitd2dbb0a249df98730271cd4229a29152d3ca4297 (patch)
tree01b6d545260db5523ed74dcce28587e6f9c5091b
parentActually use `channel` arg in _kick_command (channel_op.py) (diff)
signature
Add private message `unban` command (channel_op.py)
-rw-r--r--modules/channel_op.py10
1 files changed, 10 insertions, 0 deletions
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: <channel> <nickname/hostmask>
+ :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):
"""