From 9d8f77c1e1bf35a5170cfb6f1814136b69d0563b Mon Sep 17 00:00:00 2001 From: skizzerz Date: Mon, 11 Jan 2016 22:56:04 -0600 Subject: [PATCH] Fix stasis messages (both display for adding stasis as well as internal message keys) --- messages/en.json | 13 +++++++------ src/wolfgame.py | 16 ++++++++-------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/messages/en.json b/messages/en.json index 12dabbf..b49b3bc 100644 --- a/messages/en.json +++ b/messages/en.json @@ -549,12 +549,13 @@ "not_enough_targets": "Not enough valid targets for the {0} template.", "role_skipped": "This role has been skipped for this game.", "stasis_non_negative": "The amount of stasis has to be a non-negative integer.", - "target_in_stasis": "\u0002{0}\u0002 (Host: {1}) is in stasis for \u0002{2}\u0002 game{3}.", - "target_not_in_stasis": "\u0002{0}\u0002 (Host: {1}) is not in stasis.", - "fstasis_add_success": "\u0002{0}\u0002 (Host: {1}) is now in stasis for \u0002{2}\u0002 game{3}.", - "fstasis_remove_success": "\u0002{0}\u0002 (Host: {1}) is no longer in stasis.", - "fstasis_account_add_success": "\u0002{0}\u0002 (Account: {1}) is in stasis for \u0002{2}\u0002 game{3}.", - "fstasis_account_remove_success": "\u0002{0}\u0002 (Account: {1}) is no longer in stasis.", + "hostmask_in_stasis": "\u0002{0}\u0002 (Host: {1}) is in stasis for \u0002{2}\u0002 game{3}.", + "hostmask_not_in_stasis": "\u0002{0}\u0002 (Host: {1}) is not in stasis.", + "fstasis_hostmask_add": "\u0002{0}\u0002 (Host: {1}) is now in stasis for \u0002{2}\u0002 game{3}.", + "fstasis_hostmask_remove": "\u0002{0}\u0002 (Host: {1}) is no longer in stasis.", + "fstasis_account_add": "\u0002{0}\u0002 (Account: {1}) is now in stasis for \u0002{2}\u0002 game{3}.", + "fstasis_account_remove": "\u0002{0}\u0002 (Account: {1}) is no longer in stasis.", + "account_in_stasis": "\u0002{0}\u0002 (Account: {1}) is in stasis for \u0002{2}\u0002 game{3}.", "account_not_in_stasis": "\u0002{0}\u0002 (Account: {1}) is not in stasis.", "currently_stasised": "Currently stasised: {0}", "noone_stasised": "Nobody is currently stasised.", diff --git a/src/wolfgame.py b/src/wolfgame.py index c5e5e18..0bf5ed0 100644 --- a/src/wolfgame.py +++ b/src/wolfgame.py @@ -7701,9 +7701,9 @@ def fstasis(cli, nick, chan, rest): if len(data) == 1: if hostmask in var.STASISED: plural = "" if var.STASISED[hostmask] == 1 else "s" - msg = messages["target_in_stasis"].format(data[0], hostmask, var.STASISED[hostmask], plural) + msg = messages["hostmask_in_stasis"].format(data[0], hostmask, var.STASISED[hostmask], plural) else: - msg = messages["target_not_in_stasis"].format(data[0], hostmask) + msg = messages["hostmask_not_in_stasis"].format(data[0], hostmask) else: try: amt = int(data[1]) @@ -7729,19 +7729,19 @@ def fstasis(cli, nick, chan, rest): var.STASISED[hostmask] = amt var.set_stasis(hostmask, amt) plural = "" if amt == 1 else "s" - msg = messages["fstasis_add_success"].format(data[0], hostmask, amt, plural) + msg = messages["fstasis_hostmask_add"].format(data[0], hostmask, amt, plural) elif amt == 0: if hostmask in var.STASISED: del var.STASISED[hostmask] var.set_stasis(hostmask, 0) - msg = messages["fstasis_remove_success"].format(data[0], hostmask) + msg = messages["fstasis_hostmask_remove"].format(data[0], hostmask) else: - msg = messages["target_not_in_stasis"].format(data[0], hostmask) + msg = messages["hostmask_not_in_stasis"].format(data[0], hostmask) if not var.DISABLE_ACCOUNTS and acc: if len(data) == 1: if acc in var.STASISED_ACCS: plural = "" if var.STASISED_ACCS[acc] == 1 else "s" - msg = messages["fstasis_account_add_success"].format(data[0], acc, var.STASISED_ACCS[acc], plural) + msg = messages["account_in_stasis"].format(data[0], acc, var.STASISED_ACCS[acc], plural) else: msg = messages["account_not_in_stasis"].format(data[0], acc) else: @@ -7767,12 +7767,12 @@ def fstasis(cli, nick, chan, rest): var.STASISED_ACCS[acc] = amt var.set_stasis_acc(acc, amt) plural = "" if amt == 1 else "s" - msg = messages["fstasis_account_add_success"].format(data[0], acc, amt, plural) + msg = messages["fstasis_account_add"].format(data[0], acc, amt, plural) elif amt == 0: if acc in var.STASISED_ACCS: del var.STASISED_ACCS[acc] var.set_stasis_acc(acc, 0) - msg = messages["fstasis_account_remove_success"].format(data[0], acc) + msg = messages["fstasis_account_remove"].format(data[0], acc) else: msg = messages["account_not_in_stasis"].format(data[0], acc) elif var.STASISED or var.STASISED_ACCS: