Skip to content

Commit

Permalink
Standardize user is <> messages
Browse files Browse the repository at this point in the history
Most didn't have two periods - this way makes more sense, as there
aren't two complete sentences.
  • Loading branch information
csnardi committed Jan 12, 2016
1 parent 486875d commit f657e4a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions chatcommunicate.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,9 @@ def handle_commands(content_lower, message_parts, ev_room, ev_room_name, ev_user
uid, val = get_user_from_list_command(content_lower)
if uid > -1 and val != "":
if is_blacklisted_user((uid, val)):
return "User is blacklisted. (`{}` on `{}`).".format(uid, val)
return "User is blacklisted (`{}` on `{}`).".format(uid, val)
else:
return "User is not blacklisted. (`{}` on `{}`).".format(uid, val)
return "User is not blacklisted (`{}` on `{}`).".format(uid, val)
elif uid == -2:
return "Error: {}".format(val)
else:
Expand Down Expand Up @@ -318,9 +318,9 @@ def handle_commands(content_lower, message_parts, ev_room, ev_room_name, ev_user
uid, val = get_user_from_list_command(content_lower)
if uid > -1 and val != "":
if is_whitelisted_user((uid, val)):
return "User is whitelisted. (`{}` on `{}`).".format(uid, val)
return "User is whitelisted (`{}` on `{}`).".format(uid, val)
else:
return "User is not whitelisted. (`{}` on `{}`).".format(uid, val)
return "User is not whitelisted (`{}` on `{}`).".format(uid, val)
elif uid == -2:
return "Error: {}".format(val)
else:
Expand Down
8 changes: 4 additions & 4 deletions test/test_chatcommunicate.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@ def mock_client_get_message(client):
def is_user_currently_whitelisted(link, site, id):
event = mock_event("!!/iswlu {}".format(link), 1, 11540, "Charcoal HQ", 59776, u"Doorknob 冰")
watcher(event, client.Client())
if reply_value == "User is whitelisted. (`{}` on `{}`).".format(site, id):
if reply_value == "User is whitelisted (`{}` on `{}`).".format(site, id):
return True
if reply_value == "User is not whitelisted. (`{}` on `{}`).".format(site, id):
if reply_value == "User is not whitelisted (`{}` on `{}`).".format(site, id):
return False
return -1


def is_user_currently_blacklisted(link, site, id):
event = mock_event("!!/isblu {}".format(link), 1, 11540, "Charcoal HQ", 59776, u"Doorknob 冰")
watcher(event, client.Client())
if reply_value == "User is blacklisted. (`{}` on `{}`).".format(site, id):
if reply_value == "User is blacklisted (`{}` on `{}`).".format(site, id):
return True
if reply_value == "User is not blacklisted. (`{}` on `{}`).".format(site, id):
if reply_value == "User is not blacklisted (`{}` on `{}`).".format(site, id):
return False
return -1

Expand Down

0 comments on commit f657e4a

Please sign in to comment.