mirror of
https://github.com/irssi/irssi.git
synced 2024-10-27 05:20:20 -04:00
Add -noautosendcmd to /SERVER and /CONNECT.
Passing this option will force Irssi to not execute the content of the autosendcmd chatnet-setting upon connect. Fixes: #738 git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5209 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
518b822db4
commit
796134ffbd
@ -12,6 +12,7 @@
|
|||||||
-ircnet: Same as -network. Deprecated. Do not use.
|
-ircnet: Same as -network. Deprecated. Do not use.
|
||||||
-host: the host
|
-host: the host
|
||||||
-!: don't autojoin channels
|
-!: don't autojoin channels
|
||||||
|
-noautosendcmd: don't execute autosendcmd
|
||||||
-rawlog: immediately open rawlog after connected
|
-rawlog: immediately open rawlog after connected
|
||||||
|
|
||||||
This command makes irssi to connect to specified server.
|
This command makes irssi to connect to specified server.
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
-ircnet: Same as -network. Deprecated. Do not use
|
-ircnet: Same as -network. Deprecated. Do not use
|
||||||
-host: Specify what host name to use, if you have multiple
|
-host: Specify what host name to use, if you have multiple
|
||||||
-!: don't autojoin channels
|
-!: don't autojoin channels
|
||||||
|
-noautosendcmd: don't execute autosendcmd
|
||||||
-cmdspeed: Same as /SET cmd_queue_speed, see section 3.1
|
-cmdspeed: Same as /SET cmd_queue_speed, see section 3.1
|
||||||
-cmdmax: Same as /SET cmds_max_at_once, see section 3.1
|
-cmdmax: Same as /SET cmds_max_at_once, see section 3.1
|
||||||
-port: Use this only to edit the port number of an existing server,
|
-port: Use this only to edit the port number of an existing server,
|
||||||
|
@ -113,6 +113,9 @@ static SERVER_CONNECT_REC *get_server_connect(const char *data, int *plus_addr,
|
|||||||
if (g_hash_table_lookup(optlist, "!") != NULL)
|
if (g_hash_table_lookup(optlist, "!") != NULL)
|
||||||
conn->no_autojoin_channels = TRUE;
|
conn->no_autojoin_channels = TRUE;
|
||||||
|
|
||||||
|
if (g_hash_table_lookup(optlist, "noautosendcmd") != NULL)
|
||||||
|
conn->no_autosendcmd = TRUE;
|
||||||
|
|
||||||
if (g_hash_table_lookup(optlist, "noproxy") != NULL)
|
if (g_hash_table_lookup(optlist, "noproxy") != NULL)
|
||||||
g_free_and_null(conn->proxy);
|
g_free_and_null(conn->proxy);
|
||||||
|
|
||||||
@ -133,6 +136,7 @@ static SERVER_CONNECT_REC *get_server_connect(const char *data, int *plus_addr,
|
|||||||
|
|
||||||
/* SYNTAX: CONNECT [-4 | -6] [-ssl] [-ssl_cert <cert>] [-ssl_pkey <pkey>]
|
/* SYNTAX: CONNECT [-4 | -6] [-ssl] [-ssl_cert <cert>] [-ssl_pkey <pkey>]
|
||||||
[-ssl_verify] [-ssl_cafile <cafile>] [-ssl_capath <capath>]
|
[-ssl_verify] [-ssl_cafile <cafile>] [-ssl_capath <capath>]
|
||||||
|
[-!] [-noautosendcmd]
|
||||||
[-noproxy] [-network <network>] [-host <hostname>]
|
[-noproxy] [-network <network>] [-host <hostname>]
|
||||||
[-rawlog <file>]
|
[-rawlog <file>]
|
||||||
<address>|<chatnet> [<port> [<password> [<nick>]]] */
|
<address>|<chatnet> [<port> [<password> [<nick>]]] */
|
||||||
@ -238,6 +242,7 @@ static void sig_default_command_server(const char *data, SERVER_REC *server,
|
|||||||
|
|
||||||
/* SYNTAX: SERVER [-4 | -6] [-ssl] [-ssl_cert <cert>] [-ssl_pkey <pkey>]
|
/* SYNTAX: SERVER [-4 | -6] [-ssl] [-ssl_cert <cert>] [-ssl_pkey <pkey>]
|
||||||
[-ssl_verify] [-ssl_cafile <cafile>] [-ssl_capath <capath>]
|
[-ssl_verify] [-ssl_cafile <cafile>] [-ssl_capath <capath>]
|
||||||
|
[-!] [-noautosendcmd]
|
||||||
[-noproxy] [-network <network>] [-host <hostname>]
|
[-noproxy] [-network <network>] [-host <hostname>]
|
||||||
[-rawlog <file>]
|
[-rawlog <file>]
|
||||||
[+]<address>|<chatnet> [<port> [<password> [<nick>]]] */
|
[+]<address>|<chatnet> [<port> [<password> [<nick>]]] */
|
||||||
@ -453,7 +458,7 @@ void chat_commands_init(void)
|
|||||||
signal_add("default command server", (SIGNAL_FUNC) sig_default_command_server);
|
signal_add("default command server", (SIGNAL_FUNC) sig_default_command_server);
|
||||||
signal_add("server sendmsg", (SIGNAL_FUNC) sig_server_sendmsg);
|
signal_add("server sendmsg", (SIGNAL_FUNC) sig_server_sendmsg);
|
||||||
|
|
||||||
command_set_options("connect", "4 6 !! -network ssl +ssl_cert +ssl_pkey ssl_verify +ssl_cafile +ssl_capath +host noproxy -rawlog");
|
command_set_options("connect", "4 6 !! -network ssl +ssl_cert +ssl_pkey ssl_verify +ssl_cafile +ssl_capath +host noproxy -rawlog noautosendcmd");
|
||||||
command_set_options("msg", "channel nick");
|
command_set_options("msg", "channel nick");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,12 +118,11 @@ static void sig_connected(SERVER_REC *server)
|
|||||||
|
|
||||||
g_return_if_fail(IS_SERVER(server));
|
g_return_if_fail(IS_SERVER(server));
|
||||||
|
|
||||||
if (server->connrec->chatnet == NULL || server->session_reconnect ||
|
if (server->connrec->chatnet == NULL || server->session_reconnect)
|
||||||
server->connrec->no_autojoin_channels)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
rec = chatnet_find(server->connrec->chatnet);
|
rec = chatnet_find(server->connrec->chatnet);
|
||||||
if (rec != NULL && rec->autosendcmd)
|
if (!server->connrec->no_autosendcmd && rec != NULL && rec->autosendcmd)
|
||||||
eval_special_string(rec->autosendcmd, "", server, NULL);
|
eval_special_string(rec->autosendcmd, "", server, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ GIOChannel *connect_handle; /* connect using this handle */
|
|||||||
unsigned int reconnection:1; /* we're trying to reconnect a connected server */
|
unsigned int reconnection:1; /* we're trying to reconnect a connected server */
|
||||||
unsigned int reconnecting:1; /* we're trying to reconnect any connection */
|
unsigned int reconnecting:1; /* we're trying to reconnect any connection */
|
||||||
unsigned int no_autojoin_channels:1; /* don't autojoin any channels */
|
unsigned int no_autojoin_channels:1; /* don't autojoin any channels */
|
||||||
|
unsigned int no_autosendcmd:1; /* don't execute autosendcmd */
|
||||||
unsigned int unix_socket:1; /* Connect using named unix socket */
|
unsigned int unix_socket:1; /* Connect using named unix socket */
|
||||||
unsigned int use_ssl:1; /* this connection uses SSL */
|
unsigned int use_ssl:1; /* this connection uses SSL */
|
||||||
unsigned int ssl_verify:1;
|
unsigned int ssl_verify:1;
|
||||||
|
@ -189,6 +189,7 @@ server_connect_copy_skeleton(SERVER_CONNECT_REC *src, int connect_info)
|
|||||||
dest->channels = g_strdup(src->channels);
|
dest->channels = g_strdup(src->channels);
|
||||||
dest->away_reason = g_strdup(src->away_reason);
|
dest->away_reason = g_strdup(src->away_reason);
|
||||||
dest->no_autojoin_channels = src->no_autojoin_channels;
|
dest->no_autojoin_channels = src->no_autojoin_channels;
|
||||||
|
dest->no_autosendcmd = src->no_autosendcmd;
|
||||||
|
|
||||||
dest->use_ssl = src->use_ssl;
|
dest->use_ssl = src->use_ssl;
|
||||||
dest->ssl_cert = g_strdup(src->ssl_cert);
|
dest->ssl_cert = g_strdup(src->ssl_cert);
|
||||||
|
@ -301,6 +301,7 @@ void perl_connect_fill_hash(HV *hv, SERVER_CONNECT_REC *conn)
|
|||||||
|
|
||||||
hv_store(hv, "reconnection", 12, newSViv(conn->reconnection), 0);
|
hv_store(hv, "reconnection", 12, newSViv(conn->reconnection), 0);
|
||||||
hv_store(hv, "no_autojoin_channels", 20, newSViv(conn->no_autojoin_channels), 0);
|
hv_store(hv, "no_autojoin_channels", 20, newSViv(conn->no_autojoin_channels), 0);
|
||||||
|
hv_store(hv, "no_autosendcmd", 14, newSViv(conn->no_autosendcmd), 0);
|
||||||
hv_store(hv, "unix_socket", 11, newSViv(conn->unix_socket), 0);
|
hv_store(hv, "unix_socket", 11, newSViv(conn->unix_socket), 0);
|
||||||
hv_store(hv, "use_ssl", 7, newSViv(conn->use_ssl), 0);
|
hv_store(hv, "use_ssl", 7, newSViv(conn->use_ssl), 0);
|
||||||
hv_store(hv, "no_connect", 10, newSViv(conn->no_connect), 0);
|
hv_store(hv, "no_connect", 10, newSViv(conn->no_connect), 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user