change "non-consuming spec arg" character from "=" to "-"
This commit is contained in:
parent
a4e827cbb5
commit
63d2c16954
2 changed files with 3 additions and 3 deletions
|
@ -184,7 +184,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
|
|
||||||
@utils.hook("received.command.register")
|
@utils.hook("received.command.register")
|
||||||
@utils.kwarg("help", "Register your nickname")
|
@utils.kwarg("help", "Register your nickname")
|
||||||
@utils.spec("!=privateonly !<password>string")
|
@utils.spec("!-privateonly !<password>string")
|
||||||
def register(self, event):
|
def register(self, event):
|
||||||
hash, salt = self._get_hash(event["server"], event["user"].nickname)
|
hash, salt = self._get_hash(event["server"], event["user"].nickname)
|
||||||
if not hash and not salt:
|
if not hash and not salt:
|
||||||
|
@ -202,7 +202,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
|
|
||||||
@utils.hook("received.command.identify")
|
@utils.hook("received.command.identify")
|
||||||
@utils.kwarg("help", "Identify for your current nickname")
|
@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):
|
def identify(self, event):
|
||||||
if not event["user"].channels:
|
if not event["user"].channels:
|
||||||
raise utils.EventError("You must share at least one channel "
|
raise utils.EventError("You must share at least one channel "
|
||||||
|
|
|
@ -157,7 +157,7 @@ def argument_spec(spec: str) -> typing.List[SpecArgument]:
|
||||||
spec_argument[2:].split(",")))
|
spec_argument[2:].split(",")))
|
||||||
else:
|
else:
|
||||||
consume = True
|
consume = True
|
||||||
if spec_argument[1] == "=":
|
if spec_argument[1] == "-":
|
||||||
consume = False
|
consume = False
|
||||||
spec_argument = spec_argument[1:]
|
spec_argument = spec_argument[1:]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue