summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2010-05-06 22:10:50 +0200
committerMatthias Schiffer <matthias@gamezock.de>2010-05-06 22:10:50 +0200
commit0904e7fec48420e9f3e16125bec0219cf5e0d4db (patch)
tree562180dd0e2a8c64ab268d0f42c643194cc9261f /modules
parentb5ade70817c48290fdd804664a7003cce877fc12 (diff)
downloadcurunir-0904e7fec48420e9f3e16125bec0219cf5e0d4db.tar
curunir-0904e7fec48420e9f3e16125bec0219cf5e0d4db.zip
Added show function to topic module
Diffstat (limited to 'modules')
-rw-r--r--modules/topic.py6
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)