From 7e67b07ada5a1b16c131512faed5b3aca520fb4e Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 16 Sep 2019 16:05:36 +0100 Subject: add !channels closes #147 --- modules/stats.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'modules') diff --git a/modules/stats.py b/modules/stats.py index 2dd86f90..80e703c5 100644 --- a/modules/stats.py +++ b/modules/stats.py @@ -135,6 +135,13 @@ class Module(ModuleManager.BaseModule): channel) return channels + @utils.hook("received.command.channels") + @utils.kwarg("help", "List all the channel I'm in on this network") + @utils.kwarg("permission", "listchannels") + def channels_command(self, event): + event["stdout"].write("Current channels: %s" % + " ".join(event["server"].channels.keys())) + @utils.hook("api.get.modules") def modules_api(self, event): return list(self.bot.modules.modules.keys()) -- cgit v1.3.1-10-gc9f91