summaryrefslogtreecommitdiffstats
path: root/modules/help.py
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2010-05-02 23:40:21 +0200
committerMatthias Schiffer <matthias@gamezock.de>2010-05-02 23:40:21 +0200
commit323d31514f7e438df5883ad6cb9e17cce6a296b3 (patch)
tree2efeb977154ca92b0c8a39fe958e91166aca68df /modules/help.py
parent88a78fa5d77a3db1024375fe4c0b654038604edb (diff)
downloadcurunir-323d31514f7e438df5883ad6cb9e17cce6a296b3.tar
curunir-323d31514f7e438df5883ad6cb9e17cce6a296b3.zip
Added topic module
Diffstat (limited to 'modules/help.py')
-rw-r--r--modules/help.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/help.py b/modules/help.py
index 71d1a56..ed3e4d3 100644
--- a/modules/help.py
+++ b/modules/help.py
@@ -8,11 +8,12 @@ class Module(ModuleBase):
def commands(self):
return [('!help', 'Zeigt diese Hilfe an...')]
- def groupchat(self, room, message_from, message_body, reply):
- if not re.match(r'!help(?:\W|\Z)', message_body):
+ def groupchat(self, room, nick, text, handler):
+ if not re.match(r'!help(?:\W|\Z)', text):
return
commands = reduce(lambda l, mod: l + mod.commands(), self.manager.modules.itervalues(), [])
helpstring = reduce(lambda s, (c, h): s + c + ': ' + h + '\n', commands, '')
+ helptexts = '\n'.join(reduce(lambda l, mod: l + mod.helptexts(), self.manager.modules.itervalues(), []))
- reply('Befehle:\n\n' + helpstring)
+ handler.reply(('Befehle:\n' + helpstring + '\n' + helptexts).strip())