diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2012-06-04 09:59:03 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2012-06-04 09:59:03 +0200 |
commit | c681c660c6afefbf14c65907caedfe1ba887709f (patch) | |
tree | c2210a52b08e4b66a20469aa91c4fbb435f2cb3c /src/plugins/alias/alias.c | |
parent | 9076f359537a1601da7316f0e02fc76104d0db0e (diff) | |
download | weechat-c681c660c6afefbf14c65907caedfe1ba887709f.zip |
alias: prohibit names beginning with "#" for aliases (bug #36584)
Diffstat (limited to 'src/plugins/alias/alias.c')
-rw-r--r-- | src/plugins/alias/alias.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/alias/alias.c b/src/plugins/alias/alias.c index 77d5aa49f..514c98491 100644 --- a/src/plugins/alias/alias.c +++ b/src/plugins/alias/alias.c @@ -566,7 +566,7 @@ alias_new (const char *name, const char *command, const char *completion) { struct t_alias *new_alias, *ptr_alias, *pos_alias; - if (!name || !name[0] || !command || !command[0]) + if (!name || !name[0] || (name[0] == '#') || !command || !command[0]) return NULL; while (weechat_string_is_command_char (name)) @@ -979,6 +979,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) "completion of an existing command\n" " alias: name of alias (can start or end " "with \"*\" for alias listing)\n" + " note: the name can not start with " + "\"#\"\n" " command: command name with arguments (many " "commands can be separated by semicolons)\n\n" "Without argument, this command lists all " |