summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--doc/de/autogen/user/irc_options.txt7
-rw-r--r--doc/en/autogen/user/irc_options.txt7
-rw-r--r--doc/fr/autogen/user/irc_options.txt7
-rw-r--r--doc/it/autogen/user/irc_options.txt7
-rw-r--r--doc/ja/autogen/user/irc_options.txt7
-rw-r--r--po/cs.po13
-rw-r--r--po/de.po14
-rw-r--r--po/es.po13
-rw-r--r--po/fr.po23
-rw-r--r--po/hu.po13
-rw-r--r--po/it.po14
-rw-r--r--po/ja.po14
-rw-r--r--po/pl.po14
-rw-r--r--po/pt_BR.po13
-rw-r--r--po/ru.po13
-rw-r--r--po/tr.po13
-rw-r--r--po/weechat.pot13
-rw-r--r--src/plugins/irc/irc-config.c17
-rw-r--r--src/plugins/irc/irc-config.h1
-rw-r--r--src/plugins/irc/irc-server.c19
21 files changed, 195 insertions, 48 deletions
diff --git a/ChangeLog b/ChangeLog
index f298ac2a4..4a54e0328 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -49,6 +49,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
* aspell: fix detection of nicks with non-alphanumeric chars
* guile: disable guile gmp allocator (fix crash on unload of relay plugin)
(bug #40628)
+* irc: add option irc.network.lag_max
* irc: fix ignore on a host without nick
* irc: use color code 0x1F (`ctrl-_`) for underlined text in input line (same
code as messages) (bug #40756)
diff --git a/doc/de/autogen/user/irc_options.txt b/doc/de/autogen/user/irc_options.txt
index 4948ebe47..ee018954c 100644
--- a/doc/de/autogen/user/irc_options.txt
+++ b/doc/de/autogen/user/irc_options.txt
@@ -363,13 +363,18 @@
** Typ: integer
** Werte: 0 .. 604800 (Standardwert: `60`)
+* [[option_irc.network.lag_max]] *irc.network.lag_max*
+** Beschreibung: `maximum lag (in seconds): if this lag is reached, WeeChat will consider that the answer from server (pong) will never be received and will give up counting the lag (0 = never give up)`
+** Typ: integer
+** Werte: 0 .. 604800 (Standardwert: `1800`)
+
* [[option_irc.network.lag_min_show]] *irc.network.lag_min_show*
** Beschreibung: `geringste Verzögerungszeit (Lag) die angezeigt werden soll (in Millisekunden)`
** Typ: integer
** Werte: 0 .. 86400000 (Standardwert: `500`)
* [[option_irc.network.lag_reconnect]] *irc.network.lag_reconnect*
-** Beschreibung: `erneut mit Server verbinden, falls die maximal Verzögerung (Lag) erreicht wurde (Zeit in Sekunden, 0 = keine automatische Neuverbindung, zum Server)`
+** Beschreibung: `reconnect to server if lag is greater than or equal to this value (in seconds, 0 = never reconnect); this value must be less than or equal to irc.network.lag_max`
** Typ: integer
** Werte: 0 .. 604800 (Standardwert: `0`)
diff --git a/doc/en/autogen/user/irc_options.txt b/doc/en/autogen/user/irc_options.txt
index 020ca33ea..b5c24e07f 100644
--- a/doc/en/autogen/user/irc_options.txt
+++ b/doc/en/autogen/user/irc_options.txt
@@ -363,13 +363,18 @@
** type: integer
** values: 0 .. 604800 (default value: `60`)
+* [[option_irc.network.lag_max]] *irc.network.lag_max*
+** description: `maximum lag (in seconds): if this lag is reached, WeeChat will consider that the answer from server (pong) will never be received and will give up counting the lag (0 = never give up)`
+** type: integer
+** values: 0 .. 604800 (default value: `1800`)
+
* [[option_irc.network.lag_min_show]] *irc.network.lag_min_show*
** description: `minimum lag to show (in milliseconds)`
** type: integer
** values: 0 .. 86400000 (default value: `500`)
* [[option_irc.network.lag_reconnect]] *irc.network.lag_reconnect*
-** description: `reconnect to server if lag is greater than this value (in seconds, 0 = never reconnect)`
+** description: `reconnect to server if lag is greater than or equal to this value (in seconds, 0 = never reconnect); this value must be less than or equal to irc.network.lag_max`
** type: integer
** values: 0 .. 604800 (default value: `0`)
diff --git a/doc/fr/autogen/user/irc_options.txt b/doc/fr/autogen/user/irc_options.txt
index 373e47aec..fd72cf049 100644
--- a/doc/fr/autogen/user/irc_options.txt
+++ b/doc/fr/autogen/user/irc_options.txt
@@ -363,13 +363,18 @@
** type: entier
** valeurs: 0 .. 604800 (valeur par défaut: `60`)
+* [[option_irc.network.lag_max]] *irc.network.lag_max*
+** description: `lax maximum (en secondes): si ce lag est atteint, WeeChat considérera que la réponse du serveur (pong) ne sera jamais reçue et arrêtera de compter le lag (0 = ne jamais abandonner)`
+** type: entier
+** valeurs: 0 .. 604800 (valeur par défaut: `1800`)
+
* [[option_irc.network.lag_min_show]] *irc.network.lag_min_show*
** description: `lag minimum à afficher (en millisecondes)`
** type: entier
** valeurs: 0 .. 86400000 (valeur par défaut: `500`)
* [[option_irc.network.lag_reconnect]] *irc.network.lag_reconnect*
-** description: `se reconnecter au serveur si le lag est supérieur à cette valeur (en secondes, 0 = ne jamais se reconnecter)`
+** description: `se reconnecter au serveur si le lag est supérieur ou égal à cette valeur (en secondes, 0 = ne jamais se reconnecter); cette valeur doit être inférieure ou égale à irc.network.lag_max`
** type: entier
** valeurs: 0 .. 604800 (valeur par défaut: `0`)
diff --git a/doc/it/autogen/user/irc_options.txt b/doc/it/autogen/user/irc_options.txt
index 37253a85a..69a5659e8 100644
--- a/doc/it/autogen/user/irc_options.txt
+++ b/doc/it/autogen/user/irc_options.txt
@@ -363,13 +363,18 @@
** tipo: intero
** valori: 0 .. 604800 (valore predefinito: `60`)
+* [[option_irc.network.lag_max]] *irc.network.lag_max*
+** descrizione: `maximum lag (in seconds): if this lag is reached, WeeChat will consider that the answer from server (pong) will never be received and will give up counting the lag (0 = never give up)`
+** tipo: intero
+** valori: 0 .. 604800 (valore predefinito: `1800`)
+
* [[option_irc.network.lag_min_show]] *irc.network.lag_min_show*
** descrizione: `ritardo minimo da visualizzare (in millisecondi)`
** tipo: intero
** valori: 0 .. 86400000 (valore predefinito: `500`)
* [[option_irc.network.lag_reconnect]] *irc.network.lag_reconnect*
-** descrizione: `riconnetti al server se il ritardo è maggiore di questo valore (in secondi, 0 = nessuna riconnessione)`
+** descrizione: `reconnect to server if lag is greater than or equal to this value (in seconds, 0 = never reconnect); this value must be less than or equal to irc.network.lag_max`
** tipo: intero
** valori: 0 .. 604800 (valore predefinito: `0`)
diff --git a/doc/ja/autogen/user/irc_options.txt b/doc/ja/autogen/user/irc_options.txt
index 0b134181a..1a15139a8 100644
--- a/doc/ja/autogen/user/irc_options.txt
+++ b/doc/ja/autogen/user/irc_options.txt
@@ -363,13 +363,18 @@
** タイプ: 整数
** 値: 0 .. 604800 (デフォルト値: `60`)
+* [[option_irc.network.lag_max]] *irc.network.lag_max*
+** 説明: `maximum lag (in seconds): if this lag is reached, WeeChat will consider that the answer from server (pong) will never be received and will give up counting the lag (0 = never give up)`
+** タイプ: 整数
+** 値: 0 .. 604800 (デフォルト値: `1800`)
+
* [[option_irc.network.lag_min_show]] *irc.network.lag_min_show*
** 説明: `表示する最短の遅延 (ミリ秒単位)`
** タイプ: 整数
** 値: 0 .. 86400000 (デフォルト値: `500`)
* [[option_irc.network.lag_reconnect]] *irc.network.lag_reconnect*
-** 説明: `この値より長く遅延した場合は再接続 (秒単位、0 = 再接続しない)`
+** 説明: `reconnect to server if lag is greater than or equal to this value (in seconds, 0 = never reconnect); this value must be less than or equal to irc.network.lag_max`
** タイプ: 整数
** 値: 0 .. 604800 (デフォルト値: `0`)
diff --git a/po/cs.po b/po/cs.po
index 754eda408..b0e6399f3 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-12-01 08:38+0100\n"
+"POT-Creation-Date: 2013-12-06 08:23+0100\n"
"PO-Revision-Date: 2013-11-09 10:18+0100\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6629,13 +6629,20 @@ msgid "interval between two checks for lag (in seconds, 0 = never check)"
msgstr ""
"interval mezi dvěmi knotrolami pro lag (v sekundách, 0 = nikdy nekontrolovat)"
+msgid ""
+"maximum lag (in seconds): if this lag is reached, WeeChat will consider that "
+"the answer from server (pong) will never be received and will give up "
+"counting the lag (0 = never give up)"
+msgstr ""
+
msgid "minimum lag to show (in milliseconds)"
msgstr "minimální lag, který zobrazit (v milisekundách)"
#, fuzzy
msgid ""
-"reconnect to server if lag is greater than this value (in seconds, 0 = never "
-"reconnect)"
+"reconnect to server if lag is greater than or equal to this value (in "
+"seconds, 0 = never reconnect); this value must be less than or equal to irc."
+"network.lag_max"
msgstr "odpojit po závažném lagu (v minutách, 0 = nikny neodpojit)"
msgid ""
diff --git a/po/de.po b/po/de.po
index 0771cadf7..ec5bbd239 100644
--- a/po/de.po
+++ b/po/de.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.3-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-12-01 08:38+0100\n"
+"POT-Creation-Date: 2013-12-06 08:23+0100\n"
"PO-Revision-Date: 2013-11-20 15:12+0100\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <weechatter@arcor.de>\n"
@@ -7467,13 +7467,21 @@ msgstr ""
"Intervall zwischen zwei Überprüfungen auf Verfügbarkeit des Servers (in "
"Sekunden, 0 = keine Überprüfung)"
+msgid ""
+"maximum lag (in seconds): if this lag is reached, WeeChat will consider that "
+"the answer from server (pong) will never be received and will give up "
+"counting the lag (0 = never give up)"
+msgstr ""
+
msgid "minimum lag to show (in milliseconds)"
msgstr ""
"geringste Verzögerungszeit (Lag) die angezeigt werden soll (in Millisekunden)"
+#, fuzzy
msgid ""
-"reconnect to server if lag is greater than this value (in seconds, 0 = never "
-"reconnect)"
+"reconnect to server if lag is greater than or equal to this value (in "
+"seconds, 0 = never reconnect); this value must be less than or equal to irc."
+"network.lag_max"
msgstr ""
"erneut mit Server verbinden, falls die maximal Verzögerung (Lag) erreicht "
"wurde (Zeit in Sekunden, 0 = keine automatische Neuverbindung, zum Server)"
diff --git a/po/es.po b/po/es.po
index 77485cff6..436c1956b 100644
--- a/po/es.po
+++ b/po/es.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-12-01 08:38+0100\n"
+"POT-Creation-Date: 2013-12-06 08:23+0100\n"
"PO-Revision-Date: 2013-11-09 10:18+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6897,13 +6897,20 @@ msgstr ""
"intervalo entre dos comprobaciones de retraso (en segundos, 0 = nunca "
"comprobar)"
+msgid ""
+"maximum lag (in seconds): if this lag is reached, WeeChat will consider that "
+"the answer from server (pong) will never be received and will give up "
+"counting the lag (0 = never give up)"
+msgstr ""
+
msgid "minimum lag to show (in milliseconds)"
msgstr "retraso mínimo a mostrar (en milisegundos)"
#, fuzzy
msgid ""
-"reconnect to server if lag is greater than this value (in seconds, 0 = never "
-"reconnect)"
+"reconnect to server if lag is greater than or equal to this value (in "
+"seconds, 0 = never reconnect); this value must be less than or equal to irc."
+"network.lag_max"
msgstr ""
"desconexión tras un retraso importante (en minutos, 0 = no desconectar nunca)"
diff --git a/po/fr.po b/po/fr.po
index 61e4bb3ba..1eeafcb49 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-12-01 08:38+0100\n"
-"PO-Revision-Date: 2013-12-01 08:40+0100\n"
+"POT-Creation-Date: 2013-12-06 08:23+0100\n"
+"PO-Revision-Date: 2013-12-06 08:24+0100\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -7258,15 +7258,26 @@ msgstr ""
"intervalle entre deux vérifications du lag (en secondes, 0 = ne jamais "
"vérifier)"
+msgid ""
+"maximum lag (in seconds): if this lag is reached, WeeChat will consider that "
+"the answer from server (pong) will never be received and will give up "
+"counting the lag (0 = never give up)"
+msgstr ""
+"lax maximum (en secondes): si ce lag est atteint, WeeChat considérera que la "
+"réponse du serveur (pong) ne sera jamais reçue et arrêtera de compter le lag "
+"(0 = ne jamais abandonner)"
+
msgid "minimum lag to show (in milliseconds)"
msgstr "lag minimum à afficher (en millisecondes)"
msgid ""
-"reconnect to server if lag is greater than this value (in seconds, 0 = never "
-"reconnect)"
+"reconnect to server if lag is greater than or equal to this value (in "
+"seconds, 0 = never reconnect); this value must be less than or equal to irc."
+"network.lag_max"
msgstr ""
-"se reconnecter au serveur si le lag est supérieur à cette valeur (en "
-"secondes, 0 = ne jamais se reconnecter)"
+"se reconnecter au serveur si le lag est supérieur ou égal à cette valeur (en "
+"secondes, 0 = ne jamais se reconnecter); cette valeur doit être inférieure "
+"ou égale à irc.network.lag_max"
msgid ""
"interval between two refreshs of lag item, when lag is increasing (in "
diff --git a/po/hu.po b/po/hu.po
index 694e66a1a..e01375e50 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-12-01 08:38+0100\n"
+"POT-Creation-Date: 2013-12-06 08:23+0100\n"
"PO-Revision-Date: 2013-11-09 10:18+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6115,14 +6115,21 @@ msgstr ""
msgid "interval between two checks for lag (in seconds, 0 = never check)"
msgstr "két távollétellenőrzés közti idő (percben, 0 = nincs ellenőrzés)"
+msgid ""
+"maximum lag (in seconds): if this lag is reached, WeeChat will consider that "
+"the answer from server (pong) will never be received and will give up "
+"counting the lag (0 = never give up)"
+msgstr ""
+
#, fuzzy
msgid "minimum lag to show (in milliseconds)"
msgstr "minimális kijelzett késés (másodpercben)"
#, fuzzy
msgid ""
-"reconnect to server if lag is greater than this value (in seconds, 0 = never "
-"reconnect)"
+"reconnect to server if lag is greater than or equal to this value (in "
+"seconds, 0 = never reconnect); this value must be less than or equal to irc."
+"network.lag_max"
msgstr "lekapcsolódás túl nagy késés esetén (percben, 0 = nincs lecsatlakozás)"
#, fuzzy
diff --git a/po/it.po b/po/it.po
index 071c04875..d8e52ae2b 100644
--- a/po/it.po
+++ b/po/it.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-12-01 08:38+0100\n"
+"POT-Creation-Date: 2013-12-06 08:23+0100\n"
"PO-Revision-Date: 2013-11-09 10:18+0100\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -7031,12 +7031,20 @@ msgstr ""
"intervallo tra due controlli per il ritardo (in secondi, 0 = nessun "
"controllo)"
+msgid ""
+"maximum lag (in seconds): if this lag is reached, WeeChat will consider that "
+"the answer from server (pong) will never be received and will give up "
+"counting the lag (0 = never give up)"
+msgstr ""
+
msgid "minimum lag to show (in milliseconds)"
msgstr "ritardo minimo da visualizzare (in millisecondi)"
+#, fuzzy
msgid ""
-"reconnect to server if lag is greater than this value (in seconds, 0 = never "
-"reconnect)"
+"reconnect to server if lag is greater than or equal to this value (in "
+"seconds, 0 = never reconnect); this value must be less than or equal to irc."
+"network.lag_max"
msgstr ""
"riconnetti al server se il ritardo è maggiore di questo valore (in secondi, "
"0 = nessuna riconnessione)"
diff --git a/po/ja.po b/po/ja.po
index 6c3ab729f..2639d1a01 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-12-01 08:38+0100\n"
+"POT-Creation-Date: 2013-12-06 08:23+0100\n"
"PO-Revision-Date: 2013-11-09 10:18+0100\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/WeeChat>\n"
@@ -6958,12 +6958,20 @@ msgstr ""
msgid "interval between two checks for lag (in seconds, 0 = never check)"
msgstr "遅延の確認間のインターバル (秒単位、0 = 確認しない)"
+msgid ""
+"maximum lag (in seconds): if this lag is reached, WeeChat will consider that "
+"the answer from server (pong) will never be received and will give up "
+"counting the lag (0 = never give up)"
+msgstr ""
+
msgid "minimum lag to show (in milliseconds)"
msgstr "表示する最短の遅延 (ミリ秒単位)"
+#, fuzzy
msgid ""
-"reconnect to server if lag is greater than this value (in seconds, 0 = never "
-"reconnect)"
+"reconnect to server if lag is greater than or equal to this value (in "
+"seconds, 0 = never reconnect); this value must be less than or equal to irc."
+"network.lag_max"
msgstr "この値より長く遅延した場合は再接続 (秒単位、0 = 再接続しない)"
msgid ""
diff --git a/po/pl.po b/po/pl.po
index c567255b5..8c89be6ac 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-12-01 08:38+0100\n"
+"POT-Creation-Date: 2013-12-06 08:23+0100\n"
"PO-Revision-Date: 2013-11-11 09:07+0100\n"
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -7131,12 +7131,20 @@ msgstr ""
"przerwa między dwoma sprawdzeniami opóźnienia (w sekundach, 0 = nigdy nie "
"sprawdzaj)"
+msgid ""
+"maximum lag (in seconds): if this lag is reached, WeeChat will consider that "
+"the answer from server (pong) will never be received and will give up "
+"counting the lag (0 = never give up)"
+msgstr ""
+
msgid "minimum lag to show (in milliseconds)"
msgstr "minimalne pokazywane opóźnienie (w milisekundach)"
+#, fuzzy
msgid ""
-"reconnect to server if lag is greater than this value (in seconds, 0 = never "
-"reconnect)"
+"reconnect to server if lag is greater than or equal to this value (in "
+"seconds, 0 = never reconnect); this value must be less than or equal to irc."
+"network.lag_max"
msgstr ""
"łączy ponownie, jeśli serwer posiada opóźnienie większe niż ta wartość (w "
"sekundach, 0 = nigdy nie łącz ponownie)"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 9c3de04f4..743ed1c86 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-12-01 08:38+0100\n"
+"POT-Creation-Date: 2013-12-06 08:23+0100\n"
"PO-Revision-Date: 2013-11-09 10:18+0100\n"
"Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6333,13 +6333,20 @@ msgstr ""
msgid "interval between two checks for lag (in seconds, 0 = never check)"
msgstr ""
+msgid ""
+"maximum lag (in seconds): if this lag is reached, WeeChat will consider that "
+"the answer from server (pong) will never be received and will give up "
+"counting the lag (0 = never give up)"
+msgstr ""
+
msgid "minimum lag to show (in milliseconds)"
msgstr ""
#, fuzzy
msgid ""
-"reconnect to server if lag is greater than this value (in seconds, 0 = never "
-"reconnect)"
+"reconnect to server if lag is greater than or equal to this value (in "
+"seconds, 0 = never reconnect); this value must be less than or equal to irc."
+"network.lag_max"
msgstr ""
"intervalo entre duas verificações de ausente (em minutos, 0 = nunca "
"verificar)"
diff --git a/po/ru.po b/po/ru.po
index dfb51de99..4cc879077 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-12-01 08:38+0100\n"
+"POT-Creation-Date: 2013-12-06 08:23+0100\n"
"PO-Revision-Date: 2013-11-09 10:18+0100\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6140,14 +6140,21 @@ msgid "interval between two checks for lag (in seconds, 0 = never check)"
msgstr ""
"интервал между проверками на отсутствие (в минутах, 0 = не проверять никогда)"
+msgid ""
+"maximum lag (in seconds): if this lag is reached, WeeChat will consider that "
+"the answer from server (pong) will never be received and will give up "
+"counting the lag (0 = never give up)"
+msgstr ""
+
#, fuzzy
msgid "minimum lag to show (in milliseconds)"
msgstr "минимальная отображаемая задержка (в секундах)"
#, fuzzy
msgid ""
-"reconnect to server if lag is greater than this value (in seconds, 0 = never "
-"reconnect)"
+"reconnect to server if lag is greater than or equal to this value (in "
+"seconds, 0 = never reconnect); this value must be less than or equal to irc."
+"network.lag_max"
msgstr ""
"отключаться при серьёзной задержке (в минутах, 0 = не отключаться никогда)"
diff --git a/po/tr.po b/po/tr.po
index ccdbed129..11b09e265 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-12-01 08:38+0100\n"
+"POT-Creation-Date: 2013-12-06 08:23+0100\n"
"PO-Revision-Date: 2013-11-09 10:13+0100\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5416,12 +5416,19 @@ msgstr ""
msgid "interval between two checks for lag (in seconds, 0 = never check)"
msgstr ""
+msgid ""
+"maximum lag (in seconds): if this lag is reached, WeeChat will consider that "
+"the answer from server (pong) will never be received and will give up "
+"counting the lag (0 = never give up)"
+msgstr ""
+
msgid "minimum lag to show (in milliseconds)"
msgstr ""
msgid ""
-"reconnect to server if lag is greater than this value (in seconds, 0 = never "
-"reconnect)"
+"reconnect to server if lag is greater than or equal to this value (in "
+"seconds, 0 = never reconnect); this value must be less than or equal to irc."
+"network.lag_max"
msgstr ""
msgid ""
diff --git a/po/weechat.pot b/po/weechat.pot
index e6f23a344..1b7181613 100644
--- a/po/weechat.pot
+++ b/po/weechat.pot
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.1-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-12-01 08:38+0100\n"
+"POT-Creation-Date: 2013-12-06 08:23+0100\n"
"PO-Revision-Date: 2013-02-14 18:20+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5374,12 +5374,19 @@ msgstr ""
msgid "interval between two checks for lag (in seconds, 0 = never check)"
msgstr ""
+msgid ""
+"maximum lag (in seconds): if this lag is reached, WeeChat will consider that "
+"the answer from server (pong) will never be received and will give up "
+"counting the lag (0 = never give up)"
+msgstr ""
+
msgid "minimum lag to show (in milliseconds)"
msgstr ""
msgid ""
-"reconnect to server if lag is greater than this value (in seconds, 0 = never "
-"reconnect)"
+"reconnect to server if lag is greater than or equal to this value (in "
+"seconds, 0 = never reconnect); this value must be less than or equal to irc."
+"network.lag_max"
msgstr ""
msgid ""
diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c
index 1aa48bf0d..032976524 100644
--- a/src/plugins/irc/irc-config.c
+++ b/src/plugins/irc/irc-config.c
@@ -127,6 +127,7 @@ struct t_config_option *irc_config_network_autoreconnect_delay_max;
struct t_config_option *irc_config_network_colors_receive;
struct t_config_option *irc_config_network_colors_send;
struct t_config_option *irc_config_network_lag_check;
+struct t_config_option *irc_config_network_lag_max;
struct t_config_option *irc_config_network_lag_min_show;
struct t_config_option *irc_config_network_lag_reconnect;
struct t_config_option *irc_config_network_lag_refresh_interval;
@@ -2739,6 +2740,14 @@ irc_config_init ()
"check)"),
NULL, 0, 3600 * 24 * 7, "60", NULL, 0, NULL, NULL,
&irc_config_change_network_lag_check, NULL, NULL, NULL);
+ irc_config_network_lag_max = weechat_config_new_option (
+ irc_config_file, ptr_section,
+ "lag_max", "integer",
+ N_("maximum lag (in seconds): if this lag is reached, WeeChat will "
+ "consider that the answer from server (pong) will never be received "
+ "and will give up counting the lag (0 = never give up)"),
+ NULL, 0, 3600 * 24 * 7, "1800", NULL, 0, NULL, NULL,
+ NULL, NULL, NULL, NULL);
irc_config_network_lag_min_show = weechat_config_new_option (
irc_config_file, ptr_section,
"lag_min_show", "integer",
@@ -2748,9 +2757,11 @@ irc_config_init ()
irc_config_network_lag_reconnect = weechat_config_new_option (
irc_config_file, ptr_section,
"lag_reconnect", "integer",
- N_("reconnect to server if lag is greater than this value (in seconds, "
- "0 = never reconnect)"),
- NULL, 0, 3600 * 24 * 7, "0", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
+ N_("reconnect to server if lag is greater than or equal to this value "
+ "(in seconds, 0 = never reconnect); this value must be less than or "
+ "equal to irc.network.lag_max"),
+ NULL, 0, 3600 * 24 * 7, "0", NULL, 0, NULL, NULL,
+ NULL, NULL, NULL, NULL);
irc_config_network_lag_refresh_interval = weechat_config_new_option (
irc_config_file, ptr_section,
"lag_refresh_interval", "integer",
diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h
index 2cee3a8a4..89c29d06b 100644
--- a/src/plugins/irc/irc-config.h
+++ b/src/plugins/irc/irc-config.h
@@ -171,6 +171,7 @@ extern struct t_config_option *irc_config_network_autoreconnect_delay_max;
extern struct t_config_option *irc_config_network_colors_receive;
extern struct t_config_option *irc_config_network_colors_send;
extern struct t_config_option *irc_config_network_lag_check;
+extern struct t_config_option *irc_config_network_lag_max;
extern struct t_config_option *irc_config_network_lag_min_show;
extern struct t_config_option *irc_config_network_lag_reconnect;
extern struct t_config_option *irc_config_network_lag_refresh_interval;
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c
index 66663f910..0f5055c80 100644
--- a/src/plugins/irc/irc-server.c
+++ b/src/plugins/irc/irc-server.c
@@ -2842,7 +2842,7 @@ irc_server_timer_cb (void *data, int remaining_calls)
}
/* lag timeout? => disconnect */
if ((weechat_config_integer (irc_config_network_lag_reconnect) > 0)
- && (ptr_server->lag / 1000 > weechat_config_integer (irc_config_network_lag_reconnect)))
+ && (ptr_server->lag >= weechat_config_integer (irc_config_network_lag_reconnect) * 1000))
{
weechat_printf (ptr_server->buffer,
_("%s%s: lag is high, reconnecting to "
@@ -2854,6 +2854,23 @@ irc_server_timer_cb (void *data, int remaining_calls)
IRC_COLOR_RESET);
irc_server_disconnect (ptr_server, 0, 1);
}
+ else
+ {
+ /* stop lag counting if max lag is reached */
+ if ((weechat_config_integer (irc_config_network_lag_max) > 0)
+ && (ptr_server->lag >= (weechat_config_integer (irc_config_network_lag_max) * 1000)))
+ {
+ /* refresh lag item */
+ ptr_server->lag_last_refresh = current_time;
+ weechat_bar_item_update ("lag");
+
+ /* schedule next lag check in 5 seconds */
+ ptr_server->lag_check_time.tv_sec = 0;
+ ptr_server->lag_check_time.tv_usec = 0;
+ ptr_server->lag_next_check = time (NULL) +
+ weechat_config_integer (irc_config_network_lag_check);
+ }
+ }
}
/* remove redirects if timeout occurs */