diff options
| author | 2018-09-30 11:43:34 +0100 | |
|---|---|---|
| committer | 2018-09-30 11:43:34 +0100 | |
| commit | 30641ce312ff5ce768df5c83e54083f959401f39 (patch) | |
| tree | 923ba832e52cf6749650ca9c4791adb517fb360f /modules/commands.py | |
| parent | Fix piece of modules/define.py._get_definition( that was accepting a word or an (diff) | |
We don't need to explicitly pass "buffer" through on command events
Diffstat (limited to 'modules/commands.py')
| -rw-r--r-- | modules/commands.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/commands.py b/modules/commands.py index 6a37a31e..faa9740f 100644 --- a/modules/commands.py +++ b/modules/commands.py @@ -90,8 +90,6 @@ class Module(ModuleManager.BaseModule): if is_channel and hook.kwargs.get("private_only"): return - buffer = target.buffer - module_name = "" if hasattr(hook.function, "__self__"): module_name = hook.function.__self__._name @@ -121,7 +119,7 @@ class Module(ModuleManager.BaseModule): user = event["user"] self.events.on("received.command").on(command ).call_limited(1, user=user, server=server, - target=target, buffer=buffer, args=args, + target=target, args=args, args_split=args_split, stdout=stdout, stderr=stderr, command=command.lower(), is_channel=is_channel, tags=event["tags"]) @@ -130,7 +128,7 @@ class Module(ModuleManager.BaseModule): stderr.send() target.last_stdout = stdout target.last_stderr = stderr - buffer.skip_next() + target.buffer.skip_next() event.eat() @Utils.hook("received.message.channel", priority=EventManager.PRIORITY_LOW) |
