From db3525778e5a359e3a6a4a3ee0a8d975b3683484 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 19 May 2019 17:34:14 +0100 Subject: [PATCH] Only buffer.skip() for non-regex commands --- modules/commands/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/commands/__init__.py b/modules/commands/__init__.py index c99410a3..d4317408 100644 --- a/modules/commands/__init__.py +++ b/modules/commands/__init__.py @@ -140,8 +140,6 @@ class Module(ModuleManager.BaseModule): if hook.kwargs.get("remove_empty", True): args_split = list(filter(None, args_split)) - target.buffer.skip_next() - min_args = hook.kwargs.get("min_args") if min_args and len(args_split) < min_args: command_prefix = "" @@ -234,6 +232,7 @@ class Module(ModuleManager.BaseModule): self.command(event["server"], event["channel"], True, event["user"], command, args_split, event["tags"], "".join(event["statusmsg"]), hook) + target.buffer.skip_next() else: regex_hook = self.events.on("command.regex").get_hooks() for hook in regex_hook: @@ -262,6 +261,7 @@ class Module(ModuleManager.BaseModule): self.command(event["server"], event["user"], False, event["user"], command, event["message_split"][1:], event["tags"], "", hook) + target.buffer.skip_next() def _get_help(self, hook): return hook.get_kwarg("help", None) or hook.docstring.description