summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)