1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 23:36:37 +02:00

irc: disable creation of temporary servers by default with command /connect, new option irc.look.temporary_servers

This commit is contained in:
Sébastien Helleu
2014-09-04 07:39:05 +02:00
parent 4c49113036
commit 761ac5d0e9
29 changed files with 421 additions and 96 deletions
+22 -3
View File
@@ -1172,7 +1172,7 @@ irc_command_connect (void *data, struct t_gui_buffer *buffer, int argc,
connect_ok = 0;
}
}
else
else if (weechat_config_boolean (irc_config_look_temporary_servers))
{
if ((strncmp (argv[i], "irc", 3) == 0)
&& strstr (argv[i], "://"))
@@ -1222,6 +1222,24 @@ irc_command_connect (void *data, struct t_gui_buffer *buffer, int argc,
IRC_PLUGIN_NAME, argv[i]);
}
}
else
{
weechat_printf (
NULL,
_("%s%s: unable to create temporary server \"%s\" "
"because the creation of temporary servers with "
"command /connect is currently disabled"),
weechat_prefix ("error"), IRC_PLUGIN_NAME, argv[i]);
weechat_printf (
NULL,
_("%s%s: if you want to create a standard server, "
"use the command \"/server add\" (see /help "
"server); if you really want to create a temporary "
"server (NOT SAVED), turn on the option "
"irc.look.temporary_servers"),
weechat_prefix ("error"),
IRC_PLUGIN_NAME);
}
}
else
{
@@ -5873,10 +5891,11 @@ irc_command_init ()
N_(" server: server name, which can be:\n"
" - internal server name (created by /server add, "
"recommended usage)\n"
" - hostname/port or IP/port (this will create a TEMPORARY "
"server), port is 6667 by default\n"
" - hostname/port or IP/port, port is 6667 by default\n"
" - URL with format: irc[6][s]://[nickname[:password]@]"
"irc.example.org[:port][/#channel1][,#channel2[...]]\n"
" Note: for an address/IP/URL, a temporary server is "
"created (NOT SAVED), see /help irc.look.temporary_servers\n"
" option: set option for server (for boolean option, value can be "
"omitted)\n"
" nooption: set boolean option to 'off' (for example: -nossl)\n"