diff options
| author | 2020-04-07 19:30:32 +0100 | |
|---|---|---|
| committer | 2020-04-07 19:30:32 +0100 | |
| commit | 2b0dfcc1556741dab5452a8e1ece5f439023728c (patch) | |
| tree | b0caecc13a9f2e7082f45e89dfd0b431db65402a /modules | |
| parent | handle http redirects ourselves, to prevent redirect to localhost (diff) | |
| signature | ||
add ${BNICK} (bot's own nick) and ${CTRIGGER} (command trigger) to aliases
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/alias_variables.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/alias_variables.py b/modules/alias_variables.py index 6f2499a3..b618a7c6 100644 --- a/modules/alias_variables.py +++ b/modules/alias_variables.py @@ -5,7 +5,11 @@ class Module(ModuleManager.BaseModule): @utils.hook("get.command") @utils.kwarg("priority", EventManager.PRIORITY_HIGH) def get_command(self, event): + event["kwargs"]["CTRIGGER"] = event["command_prefix"] + + event["kwargs"]["BNICK"] = event["server"].nickname event["kwargs"]["NICK"] = event["user"].nickname + if event["is_channel"]: event["kwargs"]["CHAN"] = event["target"].name random_user = random.choice(list(event["target"].users)) |
