From 7426569d8680711e9ff22d5c86c631504f23559b Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sat, 16 Apr 2011 10:47:18 +0200 Subject: core: prohibit names beginning with "#" for bars, proxies, filters and IRC servers (bug #33020) --- src/plugins/irc/irc-command.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/plugins/irc') 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) -- cgit v1.2.3