From 24cdff9e44c8afdbb6a1289b8da451ec1d0ba9af Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 20 Jun 2019 16:52:23 +0100 Subject: Add an export for IRCv3 CAPs --- modules/ircv3_chathistory.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'modules/ircv3_chathistory.py') diff --git a/modules/ircv3_chathistory.py b/modules/ircv3_chathistory.py index 5f72850d..27daad2b 100644 --- a/modules/ircv3_chathistory.py +++ b/modules/ircv3_chathistory.py @@ -8,12 +8,8 @@ CHATHISTORY_BATCH = utils.irc.BatchType("chathistory") EVENTPLAYBACK_CAP = utils.irc.Capability(None, "draft/event-playback") HISTORY_BATCH = utils.irc.BatchType("history") +@utils.export("cap", EVENTPLAYBACK_CAP) class Module(ModuleManager.BaseModule): - @utils.hook("received.cap.ls") - @utils.hook("received.cap.new") - def on_cap(self, event): - return EVENTPLAYBACK_CAP.copy() - @utils.hook("received.batch.end") def batch_end(self, event): if (CHATHISTORY_BATCH.match(event["batch"].type) or -- cgit v1.3.1-10-gc9f91