fix !cmute +time

This commit is contained in:
jesopo 2020-09-25 18:09:10 +00:00
parent dc7040fbad
commit 09fc00b5da

View file

@ -83,7 +83,7 @@ class Module(ModuleManager.BaseModule):
channel = server.channels.get(channel_name) channel = server.channels.get(channel_name)
args = timer.kwargs.get("args", [timer.kwargs.get("arg", None)]) args = timer.kwargs.get("args", [timer.kwargs.get("arg", None)])
if args: if any(args):
channel.send_modes(args, False) channel.send_modes(args, False)
else: else:
channel.send_mode(timer.kwargs["mode"], False) channel.send_mode(timer.kwargs["mode"], False)
@ -238,7 +238,7 @@ class Module(ModuleManager.BaseModule):
if event["spec"][1]: if event["spec"][1]:
self.timers.add_persistent("unmode", event["spec"][1], self.timers.add_persistent("unmode", event["spec"][1],
channel=event["spec"][0].id, mode="m") channel=event["spec"][0].id, mode="-m")
@utils.hook("received.command.cunmute") @utils.hook("received.command.cunmute")
@utils.kwarg("require_mode", "o") @utils.kwarg("require_mode", "o")
@utils.kwarg("require_access", "high,cmute") @utils.kwarg("require_access", "high,cmute")