diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2010-05-06 22:10:50 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2010-05-06 22:10:50 +0200 |
commit | 0904e7fec48420e9f3e16125bec0219cf5e0d4db (patch) | |
tree | 562180dd0e2a8c64ab268d0f42c643194cc9261f /modules | |
parent | b5ade70817c48290fdd804664a7003cce877fc12 (diff) | |
download | curunir-0904e7fec48420e9f3e16125bec0219cf5e0d4db.tar curunir-0904e7fec48420e9f3e16125bec0219cf5e0d4db.zip |
Added show function to topic module
Diffstat (limited to 'modules')
-rw-r--r-- | modules/topic.py | 6 |
1 files changed, 5 insertions, 1 deletions
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 <Topic>', 'Fügt einen Text zum Thema des Chatraums hinzu')] + return [('!topic [<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) |