aboutsummaryrefslogtreecommitdiff
path: root/modules/commands
diff options
context:
space:
mode:
authorGravatar jesopo2019-05-06 17:17:06 +0100
committerGravatar jesopo2019-05-06 17:17:06 +0100
commitc11afedba95c613dce9697546236e593c81f137d (patch)
tree9336c526533007ad7648fedc0f0e9633dfe8e6ae /modules/commands
parentput permission control on !serverignore, don't rely on setting default of None (diff)
signature
Add !serverunignore
Diffstat (limited to 'modules/commands')
-rw-r--r--modules/commands/__init__.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/commands/__init__.py b/modules/commands/__init__.py
index 1ba00f79..46860bf3 100644
--- a/modules/commands/__init__.py
+++ b/modules/commands/__init__.py
@@ -382,6 +382,22 @@ class Module(ModuleManager.BaseModule):
event["stdout"].write("Now ignoring '%s' for %s" %
(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")
def send_stdout(self, event):
stdout = outs.StdOut(event["server"], event["module_name"],