From 0904e7fec48420e9f3e16125bec0219cf5e0d4db Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 6 May 2010 22:10:50 +0200 Subject: Added show function to topic module --- modules/topic.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/topic.py b/modules/topic.py index bc8c83e..81e1802 100644 --- a/modules/topic.py +++ b/modules/topic.py @@ -8,10 +8,14 @@ class Module(ModuleBase): ModuleBase.__init__(self, manager) def commands(self): - return [('!topic ', 'Fügt einen Text zum Thema des Chatraums hinzu')] + return [('!topic []', 'Fügt einen Text zum Thema des Chatraums hinzu oder zeigt das aktuelle Topic an')] def groupchat(self, room, nick, text, handler): + if not re.match(r'!topic(?:\W|\Z)', text): + return + if not re.match(r'!topic\W', text): + handler.reply(handler.get_topic()) return topic = re.sub(r'!topic\W+', '', text) -- cgit v1.2.3