diff options
Diffstat (limited to 'modules/help.py')
-rw-r--r-- | modules/help.py | 7 |
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()) |