diff options
| author | 2020-01-27 00:28:30 +0000 | |
|---|---|---|
| committer | 2020-01-27 00:28:30 +0000 | |
| commit | dc4adc4d713439fc6484339b321a1a1aa6af4fcb (patch) | |
| tree | 8ccdfdd066ffb8a03c7efc481b049f601ad61285 | |
| parent | `event` doesn't exist in _quiet_method() (diff) | |
| signature | ||
add non-consuming spec arg types for privateonly and channelonly
| -rw-r--r-- | src/core_modules/command_spec.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core_modules/command_spec.py b/src/core_modules/command_spec.py index 282af581..ae624e9d 100644 --- a/src/core_modules/command_spec.py +++ b/src/core_modules/command_spec.py @@ -88,6 +88,14 @@ class Module(ModuleManager.BaseModule): if args: value = server.get_user(args[0], create=True) n = 1 + elif argument_type.type == "channelonly": + if not channel == None: + n = 0 + error = "Command not valid in private message" + elif argument_type.type == "privateonly": + if channel == None: + n = 0 + error = "Command not valid in private message" options.append([argument_type, value, n, error]) return options |
