Add private message unban
command (channel_op.py)
This commit is contained in:
parent
98e1d4460e
commit
d2dbb0a249
1 changed files with 10 additions and 0 deletions
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue