put permission control on !serverignore, don't rely on setting default of None
This commit is contained in:
parent
a368bc018a
commit
96550eaef0
1 changed files with 4 additions and 1 deletions
|
@ -368,10 +368,13 @@ class Module(ModuleManager.BaseModule):
|
||||||
|
|
||||||
@utils.hook("received.command.serverignore", in_args=1)
|
@utils.hook("received.command.serverignore", in_args=1)
|
||||||
def server_ignore(self, event):
|
def server_ignore(self, event):
|
||||||
|
"""
|
||||||
|
:permission: server-ignore
|
||||||
|
"""
|
||||||
command = event["args_split"][0].lower()
|
command = event["args_split"][0].lower()
|
||||||
setting = "ignore-%s" % command
|
setting = "ignore-%s" % command
|
||||||
|
|
||||||
if event["server"].get_setting(setting):
|
if event["server"].get_setting(setting, False):
|
||||||
event["stderr"].write("I'm already ignoring '%s' for %s" %
|
event["stderr"].write("I'm already ignoring '%s' for %s" %
|
||||||
(command, str(event["server"])))
|
(command, str(event["server"])))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue