From 30641ce312ff5ce768df5c83e54083f959401f39 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 30 Sep 2018 11:43:34 +0100 Subject: We don't need to explicitly pass "buffer" through on command events --- modules/commands.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'modules/commands.py') 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) -- cgit v1.3.1-10-gc9f91