Add !caps to show negotiated IRCv3 capabilities

This commit is contained in:
jesopo 2018-11-08 22:28:32 +00:00
parent 093fc5b2a8
commit 57f697a378

View file

@ -111,3 +111,11 @@ class Module(ModuleManager.BaseModule):
@utils.hook("api.get.modules") @utils.hook("api.get.modules")
def modules_api(self, event): def modules_api(self, event):
return list(self.bot.modules.modules.keys()) return list(self.bot.modules.modules.keys())
@utils.hook("received.command.caps"
def capabilities(self, event):
"""
:help: List negotiated IRCv3 capabilities
"""
event["stdout"].write("IRCv3 capabilities: %s" %
", ".join(event["server"].capabilities))