From 63d2c169540d306ecfe92b9280a01b7ed0cf6d91 Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 28 Jan 2020 15:42:56 +0000 Subject: [PATCH] change "non-consuming spec arg" character from "=" to "-" --- src/core_modules/permissions/__init__.py | 4 ++-- src/utils/parse/spec.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core_modules/permissions/__init__.py b/src/core_modules/permissions/__init__.py index e5371a7f..ab32a50a 100644 --- a/src/core_modules/permissions/__init__.py +++ b/src/core_modules/permissions/__init__.py @@ -184,7 +184,7 @@ class Module(ModuleManager.BaseModule): @utils.hook("received.command.register") @utils.kwarg("help", "Register your nickname") - @utils.spec("!=privateonly !string") + @utils.spec("!-privateonly !string") def register(self, event): hash, salt = self._get_hash(event["server"], event["user"].nickname) if not hash and not salt: @@ -202,7 +202,7 @@ class Module(ModuleManager.BaseModule): @utils.hook("received.command.identify") @utils.kwarg("help", "Identify for your current nickname") - @utils.spec("!=privateonly ?aword !string") + @utils.spec("!-privateonly ?aword !string") def identify(self, event): if not event["user"].channels: raise utils.EventError("You must share at least one channel " diff --git a/src/utils/parse/spec.py b/src/utils/parse/spec.py index 17963350..71c22ae8 100644 --- a/src/utils/parse/spec.py +++ b/src/utils/parse/spec.py @@ -157,7 +157,7 @@ def argument_spec(spec: str) -> typing.List[SpecArgument]: spec_argument[2:].split(","))) else: consume = True - if spec_argument[1] == "=": + if spec_argument[1] == "-": consume = False spec_argument = spec_argument[1:]