Show message when alias already exists in /alias add

This commit is contained in:
James Booth
2014-01-23 22:38:12 +00:00
parent 8dbe300d72
commit e089ffb15c
6 changed files with 34 additions and 6 deletions

View File

@@ -1834,8 +1834,11 @@ cmd_alias(gchar **args, struct cmd_help_t help)
cons_show("Usage: %s", help.usage);
return TRUE;
} else {
prefs_add_alias(alias, value);
cons_show("Command alias added /%s -> %s", alias, value);
if (prefs_add_alias(alias, value) == TRUE) {
cons_show("Command alias added /%s -> %s", alias, value);
} else {
cons_show("Command alias /%s already exists.", alias);
}
return TRUE;
}
}