mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -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> */
|
/* SYNTAX: UNALIAS <alias> */
|
||||||
static void cmd_unalias(const char *data)
|
static void cmd_unalias(const char *data)
|
||||||
{
|
{
|
||||||
g_return_if_fail(data != NULL);
|
char *alias;
|
||||||
if (*data == '\0') cmd_return_error(CMDERR_NOT_ENOUGH_PARAMS);
|
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>] */
|
/* SYNTAX: RELOAD [<file>] */
|
||||||
|
Loading…
Reference in New Issue
Block a user