]> git.cworth.org Git - turbot/blobdiff - turbot/puzzle.py
Don't put the puzzle name into the channel topic
[turbot] / turbot / puzzle.py
index abfe60b505308874109938f48f234cc2791c19a0..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:
@@ -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