aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar jesopo2020-01-28 15:42:56 +0000
committerGravatar jesopo2020-01-28 15:42:56 +0000
commit63d2c169540d306ecfe92b9280a01b7ed0cf6d91 (patch)
treea34828dfb9922f902b671c6e6a4666ea6aad9a3c /src
parentswitch tweets to use utils.datetime.to_pretty_time() (diff)
signature
change "non-consuming spec arg" character from "=" to "-"
Diffstat (limited to 'src')
-rw-r--r--src/core_modules/permissions/__init__.py4
-rw-r--r--src/utils/parse/spec.py2
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 !<password>string")
+ @utils.spec("!-privateonly !<password>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 ?<account>aword !<password>string")
+ @utils.spec("!-privateonly ?<account>aword !<password>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:]