diff options
| author | 2019-05-14 13:02:45 +0100 | |
|---|---|---|
| committer | 2019-05-14 13:02:45 +0100 | |
| commit | 421d9c10c76895af78914d9e07e0a3b624a8f45b (patch) | |
| tree | a9a52bc9b694bdc9c2170777765a35db938d59c0 /modules | |
| parent | Add comment to clarify why we ignore 1-letter-nicks in _prevent_highlight (diff) | |
Add utils.irc.MessageTag and use it for both draft and ratified msgid
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/commands/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/commands/__init__.py b/modules/commands/__init__.py index ee90ec24..ff0be268 100644 --- a/modules/commands/__init__.py +++ b/modules/commands/__init__.py @@ -7,6 +7,8 @@ COMMAND_METHODS = ["PRIVMSG", "NOTICE"] REGEX_ARG_NUMBER = re.compile(r"\$(\d+)(-?)") +MSGID_TAG = utils.irc.MessageTag("msgid", "draft/msgid") + def _command_method_validate(s): if s.upper() in COMMAND_METHODS: return s.upper() @@ -133,7 +135,7 @@ class Module(ModuleManager.BaseModule): if not module_name and hasattr(hook.function, "__self__"): module_name = hook.function.__self__._name - msgid = event["tags"].get("draft/msgid", None) + msgid = MSGID_TAG.get_value(event["tags"]) statusmsg = "".join(event.get("statusmsg", [])) stdout = outs.StdOut(event["server"], module_name, target, msgid, statusmsg) |
