diff options
| author | 2019-06-03 12:44:04 +0100 | |
|---|---|---|
| committer | 2019-06-03 12:44:04 +0100 | |
| commit | 9a8b345c53e852d7092197cee084d0d3c02bc0ff (patch) | |
| tree | 408c6833c2f4de7198c354043c8ca265c0616901 /modules/ircv3_msgid.py | |
| parent | Check from_self, not if target==is_own_nickname, use from_self when adding to (diff) | |
| signature | ||
Prefix names for all IRCv3 modules with "ircv3_"
Diffstat (limited to 'modules/ircv3_msgid.py')
| -rw-r--r-- | modules/ircv3_msgid.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/ircv3_msgid.py b/modules/ircv3_msgid.py new file mode 100644 index 00000000..7edeed78 --- /dev/null +++ b/modules/ircv3_msgid.py @@ -0,0 +1,13 @@ +from src import ModuleManager, utils + +TAG = utils.irc.MessageTag("msgid", "draft/msgid") + +class Module(ModuleManager.BaseModule): + @utils.hook("received.message.channel") + #TODO: catch CTCPs + @utils.hook("received.notice.channel") + @utils.hook("received.tagmsg.channel") + def on_channel(self, event): + msgid = TAG.get_value(event["tags"]) + if not msgid == None: + event["channel"].set_setting("last-msgid", msgid) |
