diff options
author | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2016-07-13 15:26:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-13 15:26:37 +0200 |
commit | 8b471967452781d2bc355d3463ba31c2fcdf4377 (patch) | |
tree | 503fe7e654a5ebf3aafa471c0dc6f4ce04223699 | |
parent | 4be256fcf0723610e30ff30694736d2e1dec9b70 (diff) | |
parent | bd4189907eceed6a2c3252c7099985f975fc1654 (diff) | |
download | irssi-8b471967452781d2bc355d3463ba31c2fcdf4377.zip |
Merge pull request #517 from LemonBoy/unignore
Minor cosmetic fix in /unignore error message.
-rw-r--r-- | src/fe-common/core/fe-ignore.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/fe-common/core/fe-ignore.c b/src/fe-common/core/fe-ignore.c index a809ac91..52b11e6b 100644 --- a/src/fe-common/core/fe-ignore.c +++ b/src/fe-common/core/fe-ignore.c @@ -215,7 +215,7 @@ static void cmd_unignore(const char *data) { IGNORE_REC *rec; GSList *tmp; - char *mask; + char *mask, *mask_orig; void *free_arg; if (!cmd_get_params(data, &free_arg, 1, &mask)) @@ -224,6 +224,10 @@ static void cmd_unignore(const char *data) if (*mask == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS); + /* Save the mask string here since it might be modified in the code + * below and we need it to print meaningful error messages. */ + mask_orig = mask; + if (is_numeric(mask, ' ')) { /* with index number */ tmp = g_slist_nth(ignores, atoi(mask)-1); @@ -248,7 +252,7 @@ static void cmd_unignore(const char *data) ignore_update_rec(rec); } else { printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, - TXT_IGNORE_NOT_FOUND, mask); + TXT_IGNORE_NOT_FOUND, mask_orig); } cmd_params_free(free_arg); } |