aboutsummaryrefslogtreecommitdiff
path: root/src/core_modules/command_spec.py
diff options
context:
space:
mode:
authorGravatar jesopo2020-01-24 16:50:25 +0000
committerGravatar jesopo2020-01-24 16:50:25 +0000
commit241382fe66023375f3e46105a59fc8edde1a9bdf (patch)
tree6978504bac6749f60086413ec3add4e0fe024e70 /src/core_modules/command_spec.py
parentbetter "!user" spec error (diff)
signature
add some comments about all the command_spec spec types
Diffstat (limited to 'src/core_modules/command_spec.py')
-rw-r--r--src/core_modules/command_spec.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core_modules/command_spec.py b/src/core_modules/command_spec.py
index 467361f6..3e5d55bb 100644
--- a/src/core_modules/command_spec.py
+++ b/src/core_modules/command_spec.py
@@ -15,6 +15,19 @@ from src import EventManager, ModuleManager, utils
# this means, in practice, that "!r~channel" is a:
# - "revelant" channel (current if in channel, explicit arg otherwise)
# - will be used to check if a user has permissions
+#
+# spec types:
+# - "time" - +1w2d3h4m5s format time
+# - "rchannel" - relevant channel. current channel if we're in channel,
+# otherwise an explicit channel name argument
+# - "channel" - an argument of a channel name
+# - "cuser" - a nickname but only if they are in the current channel
+# - "ruser" - revlevant user. either current user if no arguments, otherwise
+# take nickname for user from given args
+# - "user" - an argument of a user's nickname
+# - "ouser" - an argument of a potentially offline user's nickname
+# - "word" - one word from arguments
+# - "..." - collect all remaining args in to a string
class Module(ModuleManager.BaseModule):
def _spec_chunk(self, server, channel, user, spec_types, args):