summaryrefslogtreecommitdiff
path: root/src/plugins/irc
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-04-16 10:47:18 +0200
committerSebastien Helleu <flashcode@flashtux.org>2011-04-16 10:47:18 +0200
commit7426569d8680711e9ff22d5c86c631504f23559b (patch)
treead44276801c10ebb02d4efd281ad90346676fcea /src/plugins/irc
parent619f470f9fc152b599ee6c92207c358f555e4c51 (diff)
downloadweechat-7426569d8680711e9ff22d5c86c631504f23559b.zip
core: prohibit names beginning with "#" for bars, proxies, filters and IRC servers (bug #33020)
Diffstat (limited to 'src/plugins/irc')
-rw-r--r--src/plugins/irc/irc-command.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c
index 1523daa9b..aff76d9da 100644
--- a/src/plugins/irc/irc-command.c
+++ b/src/plugins/irc/irc-command.c
@@ -3629,6 +3629,13 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
argv[2]);
return WEECHAT_RC_OK;
}
+ if (argv[2][0] == '#')
+ {
+ weechat_printf (NULL,
+ _("%s%s: name can not start with \"#\""),
+ weechat_prefix ("error"), IRC_PLUGIN_NAME);
+ return WEECHAT_RC_OK;
+ }
new_server = irc_server_alloc (argv[2]);
if (!new_server)