Add !serverunignore
This commit is contained in:
parent
96550eaef0
commit
c11afedba9
1 changed files with 16 additions and 0 deletions
|
@ -382,6 +382,22 @@ class Module(ModuleManager.BaseModule):
|
||||||
event["stdout"].write("Now ignoring '%s' for %s" %
|
event["stdout"].write("Now ignoring '%s' for %s" %
|
||||||
(command, str(event["server"])))
|
(command, str(event["server"])))
|
||||||
|
|
||||||
|
@utils.hook("received.command.serverunignore", in_args=1)
|
||||||
|
def server_unignore(self, event):
|
||||||
|
"""
|
||||||
|
:permission: server-unignore
|
||||||
|
"""
|
||||||
|
command = event["args_split"][0].lower()
|
||||||
|
setting = "ignore-%s" % command
|
||||||
|
|
||||||
|
if not event["server"].get_setting(setting, False):
|
||||||
|
event["stderr"].write("I'm not ignoring '%s' for %s" %
|
||||||
|
(command, str(event["server"])))
|
||||||
|
else:
|
||||||
|
event["server"].del_setting(setting)
|
||||||
|
event["stdout"].write("No longer ignoring '%s' for %s" %
|
||||||
|
(command, str(event["server"])))
|
||||||
|
|
||||||
@utils.hook("send.stdout")
|
@utils.hook("send.stdout")
|
||||||
def send_stdout(self, event):
|
def send_stdout(self, event):
|
||||||
stdout = outs.StdOut(event["server"], event["module_name"],
|
stdout = outs.StdOut(event["server"], event["module_name"],
|
||||||
|
|
Loading…
Reference in a new issue