summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--doc/en/autogen/user/irc_options.txt5
-rw-r--r--doc/fr/autogen/user/irc_options.txt5
-rw-r--r--doc/it/autogen/user/irc_options.txt5
-rw-r--r--po/cs.po12
-rw-r--r--po/de.po12
-rw-r--r--po/es.po12
-rw-r--r--po/fr.po17
-rw-r--r--po/hu.po12
-rw-r--r--po/it.po12
-rw-r--r--po/pl.po12
-rw-r--r--po/ru.po12
-rw-r--r--po/weechat.pot12
-rw-r--r--src/plugins/irc/irc-config.c9
-rw-r--r--src/plugins/irc/irc-config.h1
-rw-r--r--src/plugins/irc/irc-protocol.c5
-rw-r--r--src/plugins/irc/irc-server.c55
-rw-r--r--src/plugins/irc/irc-server.h5
18 files changed, 187 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 45ff89629..ebc31d970 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -34,6 +34,8 @@ Version 0.3.2 (under dev!)
* irc: fix bug with SSL connection (fails sometimes when ssl_verify is on)
(bug #28741)
* irc: fix PART message received on Undernet server (bug #28825)
+* irc: add option irc.network.connection_timeout (timeout between TCP connection
+ to server and reception of message 001)
* irc: add options irc.look.smart_filter_join and irc.look.smart_filter_quit
* irc: apply smart filter only on channels, not private buffers (bug #28841)
* irc: add option irc.look.item_channel_modes_hide_key to hide channel key
diff --git a/doc/en/autogen/user/irc_options.txt b/doc/en/autogen/user/irc_options.txt
index ab91d7c1b..3128ab87a 100644
--- a/doc/en/autogen/user/irc_options.txt
+++ b/doc/en/autogen/user/irc_options.txt
@@ -203,6 +203,11 @@
** type: boolean
** values: on, off (default value: on)
+* *irc.network.connection_timeout*
+** description: timeout (in seconds) between TCP connection to server and message 001 received, if this timeout is reached before 001 message is received, WeeChat will disconnect from server
+** type: integer
+** values: 1 .. 3600 (default value: 60)
+
* *irc.network.default_msg_part*
** description: default part message (leaving channel) ("%v" will be replaced by WeeChat version in string)
** type: string
diff --git a/doc/fr/autogen/user/irc_options.txt b/doc/fr/autogen/user/irc_options.txt
index 69e55706c..1cc638ff1 100644
--- a/doc/fr/autogen/user/irc_options.txt
+++ b/doc/fr/autogen/user/irc_options.txt
@@ -203,6 +203,11 @@
** type: booléen
** valeurs: on, off (valeur par défaut: on)
+* *irc.network.connection_timeout*
+** description: délai d'attente (en secondes) entre la connexion TCP au serveur et la réception du message 001, si ce délai est atteint avant que le message 001 soit reçu, WeeChat se déconnectera du serveur
+** type: entier
+** valeurs: 1 .. 3600 (valeur par défaut: 60)
+
* *irc.network.default_msg_part*
** description: message par défaut pour le part (en quittant un canal) ("%v" sera remplacé par la version de WeeChat dans la chaîne)
** type: chaîne
diff --git a/doc/it/autogen/user/irc_options.txt b/doc/it/autogen/user/irc_options.txt
index f1d3266d6..ad3d05fd1 100644
--- a/doc/it/autogen/user/irc_options.txt
+++ b/doc/it/autogen/user/irc_options.txt
@@ -203,6 +203,11 @@
** tipo: bool
** valori: on, off (valore predefinito: on)
+* *irc.network.connection_timeout*
+** descrizione: timeout (in seconds) between TCP connection to server and message 001 received, if this timeout is reached before 001 message is received, WeeChat will disconnect from server
+** tipo: intero
+** valori: 1 .. 3600 (valore predefinito: 60)
+
* *irc.network.default_msg_part*
** descrizione: messaggio di uscita predefinito (in uscita dal canale) ("%v" verrà sostituito dalla versione di WeeChat)
** tipo: stringa
diff --git a/po/cs.po b/po/cs.po
index 5458c7848..736545f8e 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-02-18 19:55+0100\n"
+"POT-Creation-Date: 2010-02-19 16:14+0100\n"
"PO-Revision-Date: 2010-02-18 19:52+0100\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4233,6 +4233,12 @@ msgid "color for channel modes, near channel name"
msgstr "barva módů kanálu, blízko jména kanálu"
msgid ""
+"timeout (in seconds) between TCP connection to server and message 001 "
+"received, if this timeout is reached before 001 message is received, WeeChat "
+"will disconnect from server"
+msgstr ""
+
+msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
"version in string)"
msgstr ""
@@ -4788,6 +4794,10 @@ msgid "%s: disconnecting from server..."
msgstr "%s: odpojuji se od serveru..."
#, c-format
+msgid "%s%s: connection timeout (message 001 not received)"
+msgstr ""
+
+#, c-format
msgid "%s%s: sasl authentication timeout"
msgstr ""
diff --git a/po/de.po b/po/de.po
index e819be522..66a45d045 100644
--- a/po/de.po
+++ b/po/de.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-02-19 07:55+0100\n"
+"POT-Creation-Date: 2010-02-19 16:14+0100\n"
"PO-Revision-Date: 2010-02-19 07:56+0100\n"
"Last-Translator: Nils G <weechatter@arcor.de>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4440,6 +4440,12 @@ msgid "color for channel modes, near channel name"
msgstr "Farbe der Channel-Modes (neben dem Channelnamen)"
msgid ""
+"timeout (in seconds) between TCP connection to server and message 001 "
+"received, if this timeout is reached before 001 message is received, WeeChat "
+"will disconnect from server"
+msgstr ""
+
+msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
"version in string)"
msgstr ""
@@ -4987,6 +4993,10 @@ msgid "%s: disconnecting from server..."
msgstr "%s: Trennung vom Server..."
#, c-format
+msgid "%s%s: connection timeout (message 001 not received)"
+msgstr ""
+
+#, c-format
msgid "%s%s: sasl authentication timeout"
msgstr "%s%s: Zeitüberschreitung bei SASL Authentifizierung"
diff --git a/po/es.po b/po/es.po
index 0484823af..df2203a15 100644
--- a/po/es.po
+++ b/po/es.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-02-18 19:55+0100\n"
+"POT-Creation-Date: 2010-02-19 16:14+0100\n"
"PO-Revision-Date: 2010-02-18 19:53+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4330,6 +4330,12 @@ msgid "color for channel modes, near channel name"
msgstr "color para los modos del canal, junto al nombre del canal"
msgid ""
+"timeout (in seconds) between TCP connection to server and message 001 "
+"received, if this timeout is reached before 001 message is received, WeeChat "
+"will disconnect from server"
+msgstr ""
+
+msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
"version in string)"
msgstr ""
@@ -4877,6 +4883,10 @@ msgstr "(conexión cerrara por un par)"
msgid "%s: disconnecting from server..."
msgstr "%s: desconectado del servidor..."
+#, c-format
+msgid "%s%s: connection timeout (message 001 not received)"
+msgstr ""
+
#, fuzzy, c-format
msgid "%s%s: sasl authentication timeout"
msgstr "No es posible escribir un fichero de log para un búfer\n"
diff --git a/po/fr.po b/po/fr.po
index b4c158f7b..205b61f50 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-02-18 19:55+0100\n"
-"PO-Revision-Date: 2010-02-18 19:56+0100\n"
+"POT-Creation-Date: 2010-02-19 16:14+0100\n"
+"PO-Revision-Date: 2010-02-19 16:16+0100\n"
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@@ -4377,6 +4377,15 @@ msgid "color for channel modes, near channel name"
msgstr "couleur pour les modes du canal, à côté du nom du canal"
msgid ""
+"timeout (in seconds) between TCP connection to server and message 001 "
+"received, if this timeout is reached before 001 message is received, WeeChat "
+"will disconnect from server"
+msgstr ""
+"délai d'attente (en secondes) entre la connexion TCP au serveur et la "
+"réception du message 001, si ce délai est atteint avant que le message 001 "
+"soit reçu, WeeChat se déconnectera du serveur"
+
+msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
"version in string)"
msgstr ""
@@ -4926,6 +4935,10 @@ msgid "%s: disconnecting from server..."
msgstr "%s: déconnexion du serveur..."
#, c-format
+msgid "%s%s: connection timeout (message 001 not received)"
+msgstr "%s%s: délai de connexion dépassé (message 001 non reçu)"
+
+#, c-format
msgid "%s%s: sasl authentication timeout"
msgstr "%s%s: délai d'authentification sasl dépassé"
diff --git a/po/hu.po b/po/hu.po
index e80cf2576..580800989 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -12,7 +12,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-02-18 19:55+0100\n"
+"POT-Creation-Date: 2010-02-19 16:14+0100\n"
"PO-Revision-Date: 2010-02-18 19:54+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4176,6 +4176,12 @@ msgstr "távollevő felhasználók nevének színe"
msgid "color for channel modes, near channel name"
msgstr "szobanevek színe az eseményekben"
+msgid ""
+"timeout (in seconds) between TCP connection to server and message 001 "
+"received, if this timeout is reached before 001 message is received, WeeChat "
+"will disconnect from server"
+msgstr ""
+
#, fuzzy
msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
@@ -4720,6 +4726,10 @@ msgstr ""
msgid "%s: disconnecting from server..."
msgstr "Lekapcsolódott a szerverről!\n"
+#, c-format
+msgid "%s%s: connection timeout (message 001 not received)"
+msgstr ""
+
#, fuzzy, c-format
msgid "%s%s: sasl authentication timeout"
msgstr "Nem sikerült a(z) \"%s\" naplófájlt írni\n"
diff --git a/po/it.po b/po/it.po
index 6df1a8552..91eb20e8d 100644
--- a/po/it.po
+++ b/po/it.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Weechat 0.3.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-02-18 19:55+0100\n"
+"POT-Creation-Date: 2010-02-19 16:14+0100\n"
"PO-Revision-Date: 2010-02-18 19:54+0100\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4328,6 +4328,12 @@ msgid "color for channel modes, near channel name"
msgstr "colore per le modalità dei canali, vicino ai nomi dei canali"
msgid ""
+"timeout (in seconds) between TCP connection to server and message 001 "
+"received, if this timeout is reached before 001 message is received, WeeChat "
+"will disconnect from server"
+msgstr ""
+
+msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
"version in string)"
msgstr ""
@@ -4875,6 +4881,10 @@ msgid "%s: disconnecting from server..."
msgstr "%s: disconnessione dal server..."
#, c-format
+msgid "%s%s: connection timeout (message 001 not received)"
+msgstr ""
+
+#, c-format
msgid "%s%s: sasl authentication timeout"
msgstr ""
diff --git a/po/pl.po b/po/pl.po
index dee6b71ce..b56631076 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.0-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-02-18 19:55+0100\n"
+"POT-Creation-Date: 2010-02-19 16:14+0100\n"
"PO-Revision-Date: 2010-02-18 19:54+0100\n"
"Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n"
"Language-Team: Polish\n"
@@ -4321,6 +4321,12 @@ msgid "color for channel modes, near channel name"
msgstr "kolor trybów kanału, przy nazwie kanału"
msgid ""
+"timeout (in seconds) between TCP connection to server and message 001 "
+"received, if this timeout is reached before 001 message is received, WeeChat "
+"will disconnect from server"
+msgstr ""
+
+msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
"version in string)"
msgstr ""
@@ -4871,6 +4877,10 @@ msgid "%s: disconnecting from server..."
msgstr "%s: rozłączam z serwerem"
#, c-format
+msgid "%s%s: connection timeout (message 001 not received)"
+msgstr ""
+
+#, c-format
msgid "%s%s: sasl authentication timeout"
msgstr ""
diff --git a/po/ru.po b/po/ru.po
index b28efb8a5..abad4be45 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-02-18 19:55+0100\n"
+"POT-Creation-Date: 2010-02-19 16:14+0100\n"
"PO-Revision-Date: 2010-02-18 19:55+0100\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4177,6 +4177,12 @@ msgstr "цвет отошедших ников"
msgid "color for channel modes, near channel name"
msgstr "цвет имён при действиях"
+msgid ""
+"timeout (in seconds) between TCP connection to server and message 001 "
+"received, if this timeout is reached before 001 message is received, WeeChat "
+"will disconnect from server"
+msgstr ""
+
#, fuzzy
msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
@@ -4728,6 +4734,10 @@ msgstr ""
msgid "%s: disconnecting from server..."
msgstr "Отключен от сервера!\n"
+#, c-format
+msgid "%s%s: connection timeout (message 001 not received)"
+msgstr ""
+
#, fuzzy, c-format
msgid "%s%s: sasl authentication timeout"
msgstr "Не могу записать лог-файл \"%s\"\n"
diff --git a/po/weechat.pot b/po/weechat.pot
index 4e74fae7b..5e7ee892e 100644
--- a/po/weechat.pot
+++ b/po/weechat.pot
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-02-18 19:55+0100\n"
+"POT-Creation-Date: 2010-02-19 16:14+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -3560,6 +3560,12 @@ msgid "color for channel modes, near channel name"
msgstr ""
msgid ""
+"timeout (in seconds) between TCP connection to server and message 001 "
+"received, if this timeout is reached before 001 message is received, WeeChat "
+"will disconnect from server"
+msgstr ""
+
+msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
"version in string)"
msgstr ""
@@ -4063,6 +4069,10 @@ msgid "%s: disconnecting from server..."
msgstr ""
#, c-format
+msgid "%s%s: connection timeout (message 001 not received)"
+msgstr ""
+
+#, c-format
msgid "%s%s: sasl authentication timeout"
msgstr ""
diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c
index 8ca836f7b..c3db51202 100644
--- a/src/plugins/irc/irc-config.c
+++ b/src/plugins/irc/irc-config.c
@@ -87,6 +87,7 @@ struct t_config_option *irc_config_color_item_channel_modes;
/* IRC config, network section */
+struct t_config_option *irc_config_network_connection_timeout;
struct t_config_option *irc_config_network_default_msg_part;
struct t_config_option *irc_config_network_default_msg_quit;
struct t_config_option *irc_config_network_away_check;
@@ -1626,6 +1627,14 @@ irc_config_init ()
return 0;
}
+ irc_config_network_connection_timeout = weechat_config_new_option (
+ irc_config_file, ptr_section,
+ "connection_timeout", "integer",
+ N_("timeout (in seconds) between TCP connection to server and message "
+ "001 received, if this timeout is reached before 001 message is "
+ "received, WeeChat will disconnect from server"),
+ NULL, 1, 3600, "60", NULL, 0, NULL, NULL,
+ NULL, NULL, NULL, NULL);
irc_config_network_default_msg_part = weechat_config_new_option (
irc_config_file, ptr_section,
"default_msg_part", "string",
diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h
index 0fa164a33..e11100c5a 100644
--- a/src/plugins/irc/irc-config.h
+++ b/src/plugins/irc/irc-config.h
@@ -105,6 +105,7 @@ extern struct t_config_option *irc_config_color_input_nick;
extern struct t_config_option *irc_config_color_item_away;
extern struct t_config_option *irc_config_color_item_channel_modes;
+extern struct t_config_option *irc_config_network_connection_timeout;
extern struct t_config_option *irc_config_network_default_msg_part;
extern struct t_config_option *irc_config_network_default_msg_quit;
extern struct t_config_option *irc_config_network_away_check;
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index 42f6e52ab..1e047f12d 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -1790,6 +1790,11 @@ irc_protocol_cmd_001 (struct t_irc_server *server, const char *command,
/* connection to IRC server is ok! */
server->is_connected = 1;
+ if (server->hook_timer_connection)
+ {
+ weechat_unhook (server->hook_timer_connection);
+ server->hook_timer_connection = NULL;
+ }
server->lag_next_check = time (NULL) +
weechat_config_integer (irc_config_network_lag_check);
irc_server_set_buffer_title (server);
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c
index 81172b43a..db86dd6e5 100644
--- a/src/plugins/irc/irc-server.c
+++ b/src/plugins/irc/irc-server.c
@@ -320,6 +320,7 @@ irc_server_alloc (const char *name)
new_server->sock = -1;
new_server->hook_connect = NULL;
new_server->hook_fd = NULL;
+ new_server->hook_timer_connection = NULL;
new_server->hook_timer_sasl = NULL;
new_server->is_connected = 0;
new_server->ssl_connected = 0;
@@ -714,6 +715,8 @@ irc_server_free_data (struct t_irc_server *server)
weechat_unhook (server->hook_connect);
if (server->hook_fd)
weechat_unhook (server->hook_fd);
+ if (server->hook_timer_connection)
+ weechat_unhook (server->hook_timer_connection);
if (server->hook_timer_sasl)
weechat_unhook (server->hook_timer_sasl);
if (server->unterminated_message)
@@ -1659,7 +1662,7 @@ irc_server_msgq_flush ()
*/
int
-irc_server_recv_cb (void *arg_server, int fd)
+irc_server_recv_cb (void *data, int fd)
{
struct t_irc_server *server;
static char buffer[4096 + 2];
@@ -1668,7 +1671,7 @@ irc_server_recv_cb (void *arg_server, int fd)
/* make C compiler happy */
(void) fd;
- server = (struct t_irc_server *)arg_server;
+ server = (struct t_irc_server *)data;
if (!server)
return WEECHAT_RC_ERROR;
@@ -1731,6 +1734,38 @@ irc_server_recv_cb (void *arg_server, int fd)
}
/*
+ * irc_server_timer_connection_cb: callback for server connection
+ * it is called if WeeChat is TCP-connected to
+ * server, but did not receive message 001
+ */
+
+int
+irc_server_timer_connection_cb (void *data, int remaining_calls)
+{
+ struct t_irc_server *server;
+
+ /* make C compiler happy */
+ (void) remaining_calls;
+
+ server = (struct t_irc_server *)data;
+
+ if (!server)
+ return WEECHAT_RC_ERROR;
+
+ server->hook_timer_connection = NULL;
+
+ if (!server->is_connected)
+ {
+ weechat_printf (server->buffer,
+ _("%s%s: connection timeout (message 001 not received)"),
+ weechat_prefix ("error"), IRC_PLUGIN_NAME);
+ irc_server_disconnect (server, 1);
+ }
+
+ return WEECHAT_RC_OK;
+}
+
+/*
* irc_server_timer_sasl_cb: callback for SASL authentication timer
* it is called if there is a timeout with SASL
* authentication
@@ -1740,14 +1775,14 @@ irc_server_recv_cb (void *arg_server, int fd)
*/
int
-irc_server_timer_sasl_cb (void *arg_server, int remaining_calls)
+irc_server_timer_sasl_cb (void *data, int remaining_calls)
{
struct t_irc_server *server;
/* make C compiler happy */
(void) remaining_calls;
- server = (struct t_irc_server *)arg_server;
+ server = (struct t_irc_server *)data;
if (!server)
return WEECHAT_RC_ERROR;
@@ -1990,6 +2025,13 @@ irc_server_login (struct t_irc_server *server)
server->addresses_array[server->index_current_address],
(realname && realname[0]) ?
realname : "weechat");
+
+ if (server->hook_timer_connection)
+ weechat_unhook (server->hook_timer_connection);
+ server->hook_timer_connection = weechat_hook_timer (weechat_config_integer (irc_config_network_connection_timeout) * 1000,
+ 0, 1,
+ &irc_server_timer_connection_cb,
+ server);
}
/*
@@ -2020,13 +2062,13 @@ irc_server_switch_address (struct t_irc_server *server)
*/
int
-irc_server_connect_cb (void *arg_server, int status, int gnutls_rc,
+irc_server_connect_cb (void *data, int status, int gnutls_rc,
const char *error, const char *ip_address)
{
struct t_irc_server *server;
const char *proxy;
- server = (struct t_irc_server *)arg_server;
+ server = (struct t_irc_server *)data;
proxy = IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_PROXY);
@@ -3645,6 +3687,7 @@ irc_server_print_log ()
weechat_log_printf (" sock . . . . . . . . : %d", ptr_server->sock);
weechat_log_printf (" hook_connect . . . . : 0x%lx", ptr_server->hook_connect);
weechat_log_printf (" hook_fd. . . . . . . : 0x%lx", ptr_server->hook_fd);
+ weechat_log_printf (" hook_timer_connection: 0x%lx", ptr_server->hook_timer_connection);
weechat_log_printf (" hook_timer_sasl. . . : 0x%lx", ptr_server->hook_timer_sasl);
weechat_log_printf (" is_connected . . . . : %d", ptr_server->is_connected);
weechat_log_printf (" ssl_connected. . . . : %d", ptr_server->ssl_connected);
diff --git a/src/plugins/irc/irc-server.h b/src/plugins/irc/irc-server.h
index 0581fb555..32fb57aa2 100644
--- a/src/plugins/irc/irc-server.h
+++ b/src/plugins/irc/irc-server.h
@@ -121,6 +121,7 @@ struct t_irc_server
int sock; /* socket for server (IPv4 or IPv6) */
struct t_hook *hook_connect; /* connection hook */
struct t_hook *hook_fd; /* hook for server socket */
+ struct t_hook *hook_timer_connection; /* timer for connection */
struct t_hook *hook_timer_sasl; /* timer for SASL authentication */
int is_connected; /* 1 if WeeChat is connected to server */
int ssl_connected; /* = 1 if connected with SSL */
@@ -204,8 +205,8 @@ extern struct t_gui_buffer *irc_server_create_buffer (struct t_irc_server *serve
extern int irc_server_connect (struct t_irc_server *server);
extern void irc_server_auto_connect ();
extern void irc_server_autojoin_channels ();
-extern int irc_server_recv_cb (void *arg_server, int fd);
-extern int irc_server_timer_sasl_cb (void *arg_server, int remaining_calls);
+extern int irc_server_recv_cb (void *data, int fd);
+extern int irc_server_timer_sasl_cb (void *data, int remaining_calls);
extern int irc_server_timer_cb (void *data, int remaining_calls);
extern int irc_server_timer_check_away_cb (void *data, int remaining_calls);
extern void irc_server_outqueue_free_all (struct t_irc_server *server,