diff options
Diffstat (limited to 'modules/commands.py')
| -rw-r--r-- | modules/commands.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/modules/commands.py b/modules/commands.py index cf0f3207..53feb2d4 100644 --- a/modules/commands.py +++ b/modules/commands.py @@ -216,12 +216,17 @@ class Module(ModuleManager.BaseModule): args = " ".join(args_split) server = event["server"] user = event["user"] + + new_event = self.events.on("received.command").on(command + ).make_event(user=user, server=server, target=target, + args=args, tags=event["tags"], args_split=args_split, + stdout=stdout, stderr=stderr, command=command.lower(), + is_channel=is_channel) + + self.log.trace("calling command '%s': %s" % (command, + new_event.kwargs)) try: - self.events.on("received.command").on(command - ).call_unsafe_limited(1, user=user, server=server, - target=target, args=args, tags=event["tags"], - args_split=args_split, stdout=stdout, stderr=stderr, - command=command.lower(), is_channel=is_channel) + hook.call(new_event) except utils.EventError as e: stderr.write(str(e)) |
