diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2006-03-30 17:08:23 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2006-03-30 17:08:23 +0000 |
commit | cc324abb758facdf8d29c3828030c7796027a9a4 (patch) | |
tree | acbfdc04b500c5cda213a70c4beed1e79d773896 /src/common | |
parent | 8c8a4104f0ed837e2d339cb00e92a6b634a44a95 (diff) | |
download | weechat-cc324abb758facdf8d29c3828030c7796027a9a4.zip |
Fixed bug with /alias and /unalias commands when alias begins with '/'
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/command.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/common/command.c b/src/common/command.c index ffe2f4eb7..f5d6bc1c3 100644 --- a/src/common/command.c +++ b/src/common/command.c @@ -341,8 +341,10 @@ alias_new (char *alias_name, char *alias_command) { t_weechat_alias *new_alias, *ptr_alias; - if (alias_name[0] == '/') + while (alias_name[0] == '/') + { alias_name++; + } if (ascii_strcasecmp (alias_name, "builtin") == 0) return NULL; @@ -1105,6 +1107,11 @@ weechat_cmd_alias (t_irc_server *server, t_irc_channel *channel, if (arguments && arguments[0]) { + while (arguments[0] == '/') + { + arguments++; + } + /* Define new alias */ pos = strchr (arguments, ' '); if (pos) @@ -3525,6 +3532,9 @@ weechat_cmd_unalias (t_irc_server *server, t_irc_channel *channel, (void) server; (void) channel; + if (arguments[0] == '/') + arguments++; + ptr_weelist = weelist_search (index_commands, arguments); if (!ptr_weelist) { |