]> git.cworth.org Git - turbot/blobdiff - turbot/puzzle.py
Don't put the puzzle name into the channel topic
[turbot] / turbot / puzzle.py
index 1d1fda85bff975dea6adea33942a5eeaaece7914..a6d3ffd809b2af59e44f564e1ae78092588d7f4c 100644 (file)
@@ -249,8 +249,6 @@ def puzzle_channel_topic(puzzle):
     if puzzle['status'] == 'solved':
         topic += "SOLVED: `{}` ".format('`, `'.join(puzzle['solution']))
 
-    topic += puzzle['name']
-
     links = []
 
     url = puzzle.get('url', None)
@@ -262,7 +260,7 @@ def puzzle_channel_topic(puzzle):
         links.append("<{}|Sheet>".format(sheet_url))
 
     if len(links):
-        topic += "({})".format(', '.join(links))
+        topic += "({}) ".format(', '.join(links))
 
     tags = puzzle.get('tags', [])
     if tags:
@@ -283,7 +281,7 @@ def puzzle_channel_name(puzzle):
 
     meta = ''
     if puzzle.get('type', 'plain') == 'meta':
-        meta = '-m'
+        meta = '--m'
 
     # Note: We don't use puzzle['puzzle_id'] here because we're keeping
     # that as a persistent identifier in the database. Instead we
@@ -357,4 +355,7 @@ def puzzle_copy(old_puzzle):
     if 'tags' in old_puzzle:
         new_puzzle['tags'] = old_puzzle['tags'].copy()
 
+    if 'solution' in old_puzzle:
+        new_puzzle['solution'] = old_puzzle['solution'].copy()
+
     return new_puzzle