X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=turbot%2Finteraction.py;h=13b8ebf00fd6a31ceb60757b076ff86f30421dcd;hb=4bca55ecc12eb56357e5a5279fece0adced30430;hp=99e76e6d688f34266cb568d5a808dd2fc9fc0a82;hpb=3385d460742786491db31c1587a86886a3e1b6c8;p=turbot diff --git a/turbot/interaction.py b/turbot/interaction.py index 99e76e6..13b8ebf 100644 --- a/turbot/interaction.py +++ b/turbot/interaction.py @@ -927,8 +927,8 @@ def tag(turb, body, args): tag = tag.upper() # Reject a tag that is not alphabetic or underscore A-Z_ - if not re.match(r'^[A-Z_]*$', tag): - return bot_reply("Sorry, tags can only contain letters " + if not re.match(r'^[A-Z0-9_]*$', tag): + return bot_reply("Sorry, tags can only contain letters, numbers, " + "and the underscore character.") if action == 'remove': @@ -967,7 +967,7 @@ def solved(turb, body, args): The args string should be a confirmed solution.""" channel_id = body['channel_id'][0] - user_name = body['user_name'][0] + user_id = body['user_id'][0] old_puzzle = puzzle_for_channel(turb, channel_id) @@ -991,7 +991,7 @@ def solved(turb, body, args): # Report the solution to the puzzle's channel slack_send_message( turb.slack_client, channel_id, - "Puzzle mark solved by {}: `{}`".format(user_name, args)) + "Puzzle mark solved by <@{}>: `{}`".format(user_id, args)) # Also report the solution to the hunt channel hunt = find_hunt_for_hunt_id(turb, puzzle['hunt_id']) @@ -1024,9 +1024,10 @@ def hunt(turb, body, args): character in a term). All terms must match on a puzzle in order for that puzzle to be included. But a puzzle will be considered to match if any of the puzzle title, round title, puzzle URL, puzzle - state, or puzzle solution match. Matching will be performed - without regard to case sensitivity and the search terms can - include regular expression syntax. + state, puzzle type, tags, or puzzle solution match. Matching will + be performed without regard to case sensitivity and the search + terms can include regular expression syntax. + """ channel_id = body['channel_id'][0]