mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
/UNALIAS didn't work if it had space at the end.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2837 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
9092649c74
commit
2013e4b004
@ -240,10 +240,17 @@ static void cmd_alias(const char *data)
|
||||
/* SYNTAX: UNALIAS <alias> */
|
||||
static void cmd_unalias(const char *data)
|
||||
{
|
||||
g_return_if_fail(data != NULL);
|
||||
if (*data == '\0') cmd_return_error(CMDERR_NOT_ENOUGH_PARAMS);
|
||||
char *alias;
|
||||
void *free_arg;
|
||||
|
||||
alias_remove(data);
|
||||
g_return_if_fail(data != NULL);
|
||||
|
||||
if (!cmd_get_params(data, &free_arg, 1, &alias))
|
||||
return;
|
||||
if (*alias == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
|
||||
|
||||
alias_remove(alias);
|
||||
cmd_params_free(free_arg);
|
||||
}
|
||||
|
||||
/* SYNTAX: RELOAD [<file>] */
|
||||
|
Loading…
Reference in New Issue
Block a user