aboutsummaryrefslogtreecommitdiff
path: root/modules/stats.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-09-16 16:05:36 +0100
committerGravatar jesopo2019-09-16 16:05:36 +0100
commit7e67b07ada5a1b16c131512faed5b3aca520fb4e (patch)
tree0626d16e49f637ea850968dcf3cb6303eb887b07 /modules/stats.py
parentmove getting private_key/our_actor to __init__ (for main thread) (diff)
signature
add !channels
closes #147
Diffstat (limited to 'modules/stats.py')
-rw-r--r--modules/stats.py7
1 files changed, 7 insertions, 0 deletions
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())