diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2004-12-27 16:22:39 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2004-12-27 16:22:39 +0000 |
commit | f4f2ec3668624b8cf29b9dab734f9069d90a8fec (patch) | |
tree | 1559d5284d4d839044759bbafc7f5a4b60c62d55 | |
parent | 486e55be0255d22a2530068d2a684273003c944e (diff) | |
download | weechat-f4f2ec3668624b8cf29b9dab734f9069d90a8fec.zip |
auto-reconnection to server (new options: server_autoreconnect (on/off), server_autoreconnect_delay (in seconds)), disconnections are now managed without problem by WeeChat
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | po/fr.po | 386 | ||||
-rw-r--r-- | po/weechat.pot | 354 | ||||
-rw-r--r-- | src/common/command.c | 24 | ||||
-rw-r--r-- | src/common/weechat.c | 6 | ||||
-rw-r--r-- | src/common/weeconfig.c | 15 | ||||
-rw-r--r-- | src/gui/curses/gui-input.c | 10 | ||||
-rw-r--r-- | src/irc/irc-recv.c | 47 | ||||
-rw-r--r-- | src/irc/irc-server.c | 78 | ||||
-rw-r--r-- | src/irc/irc.h | 15 | ||||
-rw-r--r-- | weechat/ChangeLog | 6 | ||||
-rw-r--r-- | weechat/po/fr.po | 386 | ||||
-rw-r--r-- | weechat/po/weechat.pot | 354 | ||||
-rw-r--r-- | weechat/src/common/command.c | 24 | ||||
-rw-r--r-- | weechat/src/common/weechat.c | 6 | ||||
-rw-r--r-- | weechat/src/common/weeconfig.c | 15 | ||||
-rw-r--r-- | weechat/src/gui/curses/gui-input.c | 10 | ||||
-rw-r--r-- | weechat/src/irc/irc-recv.c | 47 | ||||
-rw-r--r-- | weechat/src/irc/irc-server.c | 78 | ||||
-rw-r--r-- | weechat/src/irc/irc.h | 15 |
20 files changed, 1090 insertions, 792 deletions
@@ -5,7 +5,11 @@ ChangeLog - 2004-12-27 Version 0.0.9 (under dev!): - * major bug fixed when socket is closed by server (100% CPU usage fixed) + * auto-reconnection to server (new options: server_autoreconnect (on/off), + server_autoreconnect_delay (in seconds)) + * major bug fixed when socket is closed by server (100% CPU usage fixed), + and disconnections are now ok (all channels are "closed", history is still + visible, and buffer will be used again if reconnection to server) * option "look_remove_colors_from_msgs" is now working * fixed display of nick mode changes * /notice command fixed (and display when received from server) @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.0.9-pre1\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2004-12-27 13:52+0100\n" +"POT-Creation-Date: 2004-12-27 17:09+0100\n" "PO-Revision-Date: 2004-12-21 20:51+0100\n" "Last-Translator: FlashCode <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -20,96 +20,105 @@ msgstr "" msgid "%s cannot allocate new nick\n" msgstr "%s ompossible d'allouer un nouveau pseudo\n" -#: src/irc/irc-server.c:130 src/common/weeconfig.c:1241 +#: src/irc/irc-server.c:134 src/common/weeconfig.c:1250 msgid "Unable to get user's name" msgstr "Impossible de déterminer le nom d'utilisateur" -#: src/irc/irc-server.c:195 +#: src/irc/irc-server.c:199 #, c-format msgid "%s cannot allocate new server\n" msgstr "%s impossible d'allouer un nouveau serveur\n" -#: src/irc/irc-server.c:386 +#: src/irc/irc-server.c:393 #, c-format msgid "%s error sending data to IRC server\n" msgstr "%s erreur d'envoi de données au serveur IRC\n" -#: src/irc/irc-server.c:403 src/irc/irc-server.c:414 src/irc/irc-server.c:468 +#: src/irc/irc-server.c:410 src/irc/irc-server.c:421 src/irc/irc-server.c:475 #, c-format msgid "%s not enough memory for received IRC message\n" msgstr "%s mémoire insuffisante pour un message IRC reçu\n" -#: src/irc/irc-server.c:475 +#: src/irc/irc-server.c:482 #, c-format msgid "%s unable to explode received buffer\n" msgstr "%s impossible d'exploser le tampon de réception\n" -#: src/irc/irc-server.c:548 +#: src/irc/irc-server.c:555 #, c-format msgid "Command '%s' failed!\n" msgstr "La commande '%s' a échoué !\n" -#: src/irc/irc-server.c:552 +#: src/irc/irc-server.c:559 msgid "No command to execute!\n" msgstr "Pas de commande à exécuter !\n" -#: src/irc/irc-server.c:556 +#: src/irc/irc-server.c:563 #, c-format msgid "Unknown command: cmd=%s, args=%s\n" msgstr "Commande inconnue: cmd=%s, params=%s\n" -#: src/irc/irc-server.c:594 +#: src/irc/irc-server.c:601 #, c-format msgid "%s cannot read data from socket, disconnecting from server...\n" msgstr "" "%s impossible de lire des données sur la socket, déconnexion du serveur...\n" -#: src/irc/irc-server.c:614 +#: src/irc/irc-server.c:622 #, c-format msgid "%s: connecting to %s:%d...\n" msgstr "%s: connexion à %s:%d...\n" -#: src/irc/irc-server.c:616 +#: src/irc/irc-server.c:624 #, c-format msgid "connecting to server %s:%d...\n" msgstr "connexion au serveur %s:%d...\n" -#: src/irc/irc-server.c:624 +#: src/irc/irc-server.c:632 #, c-format msgid "%s cannot create pipe\n" msgstr "%s impossible de créer le pipe\n" -#: src/irc/irc-server.c:638 +#: src/irc/irc-server.c:646 #, c-format msgid "%s cannot set socket option \"SO_REUSEADDR\"\n" msgstr "%s impossible de paramétrer l'option socket \"SO_REUSEADDR\"\n" -#: src/irc/irc-server.c:645 +#: src/irc/irc-server.c:653 #, c-format msgid "%s cannot set socket option \"SO_KEEPALIVE\"\n" msgstr "%s impossible de paramétrer l'option socket \"SO_KEEPALIVE\"\n" -#: src/irc/irc-server.c:653 +#: src/irc/irc-server.c:661 #, c-format msgid "%s address \"%s\" not found\n" msgstr "%s adresse \"%s\" introuvable\n" -#: src/irc/irc-server.c:676 +#: src/irc/irc-server.c:684 #, c-format msgid "%s IP address not found\n" msgstr "%s adresse IP introuvable\n" -#: src/irc/irc-server.c:686 +#: src/irc/irc-server.c:694 #, c-format msgid "%s: server IP is: %s\n" msgstr "%s: l'adresse IP du serveur est : %s\n" -#: src/irc/irc-server.c:692 +#: src/irc/irc-server.c:700 #, c-format msgid "%s cannot connect to irc server\n" msgstr "%s connexion au serveur irc impossible\n" -#: src/irc/irc-server.c:741 +#: src/irc/irc-server.c:718 +msgid "Reconnecting to server...\n" +msgstr "Reconnexion au serveur...\n" + +#: src/irc/irc-server.c:729 src/irc/irc-server.c:798 +#, c-format +msgid "Reconnecting to server in %d seconds\n" +msgstr "Reconnexion au serveur dans %d secondes\n" + +#: src/irc/irc-server.c:773 msgid "Disconnected from server!\n" msgstr "Déconnecté du serveur !\n" @@ -1143,7 +1152,7 @@ msgstr "drapeau de mode inconnu" msgid "can't change mode for other users" msgstr "impossible de changer le mode pour les autres utilisateurs" -#: src/irc/irc-send.c:58 src/irc/irc-recv.c:2934 +#: src/irc/irc-send.c:58 src/irc/irc-recv.c:2961 msgid "unknown" msgstr "inconnu" @@ -1178,7 +1187,7 @@ msgstr "%s utilisateur non trouvé pour la commande \"%s\"\n" msgid "%s cannot create new private window \"%s\"\n" msgstr "%s impossible de créer la fenêtre privée \"%s\"\n" -#: src/irc/irc-send.c:670 src/irc/irc-send.c:741 src/common/command.c:1304 +#: src/irc/irc-send.c:670 src/irc/irc-send.c:741 src/common/command.c:1302 #, c-format msgid "%s wrong argument count for \"%s\" command\n" msgstr "%s nombre de paramètres erroné pour la commande \"%s\"\n" @@ -1198,7 +1207,7 @@ msgid " has joined " msgstr " a rejoint " #: src/irc/irc-recv.c:229 src/irc/irc-recv.c:593 src/irc/irc-recv.c:899 -#: src/irc/irc-recv.c:1039 src/irc/irc-recv.c:2434 src/irc/irc-recv.c:2499 +#: src/irc/irc-recv.c:1039 src/irc/irc-recv.c:2449 src/irc/irc-recv.c:2514 #, c-format msgid "%s channel not found for \"%s\" command\n" msgstr "%s canal non trouvé pour la commande \"%s\"\n" @@ -1372,8 +1381,8 @@ msgid "from" msgstr "de" #: src/irc/irc-recv.c:1123 src/irc/irc-recv.c:1137 src/irc/irc-recv.c:1152 -#: src/irc/irc-recv.c:1167 src/irc/irc-recv.c:1261 src/irc/irc-recv.c:2720 -#: src/irc/irc-recv.c:2760 +#: src/irc/irc-recv.c:1167 src/irc/irc-recv.c:1261 src/irc/irc-recv.c:2735 +#: src/irc/irc-recv.c:2775 #, c-format msgid "%s cannot parse \"%s\" command\n" msgstr "%s impossible d'analyser la commande \"%s\"\n" @@ -1405,160 +1414,160 @@ msgstr " en: \"%s\"\n" msgid " has unset topic for " msgstr " a retiré le titre pour " -#: src/irc/irc-recv.c:1570 +#: src/irc/irc-recv.c:1585 #, c-format msgid " is away: %s\n" msgstr " est absent: %s\n" -#: src/irc/irc-recv.c:1644 +#: src/irc/irc-recv.c:1659 msgid "Users online: " msgstr "Utilisateurs en ligne: " -#: src/irc/irc-recv.c:2007 +#: src/irc/irc-recv.c:2022 msgid "idle: " msgstr "inactivité: " -#: src/irc/irc-recv.c:2015 +#: src/irc/irc-recv.c:2030 msgid "days" msgstr "jours" -#: src/irc/irc-recv.c:2015 +#: src/irc/irc-recv.c:2030 msgid "day" msgstr "jour" -#: src/irc/irc-recv.c:2025 +#: src/irc/irc-recv.c:2040 msgid "hours" msgstr "heures" -#: src/irc/irc-recv.c:2025 +#: src/irc/irc-recv.c:2040 msgid "hour" msgstr "heure" -#: src/irc/irc-recv.c:2031 +#: src/irc/irc-recv.c:2046 msgid "minutes" msgstr "minutes" -#: src/irc/irc-recv.c:2031 +#: src/irc/irc-recv.c:2046 msgid "minute" msgstr "minute" -#: src/irc/irc-recv.c:2037 +#: src/irc/irc-recv.c:2052 msgid "seconds" msgstr "secondes" -#: src/irc/irc-recv.c:2037 +#: src/irc/irc-recv.c:2052 msgid "second" msgstr "seconde" -#: src/irc/irc-recv.c:2042 +#: src/irc/irc-recv.c:2057 msgid "signon at: " msgstr "signé le: " -#: src/irc/irc-recv.c:2130 +#: src/irc/irc-recv.c:2145 msgid "Channels: " msgstr "Canaux: " -#: src/irc/irc-recv.c:2381 +#: src/irc/irc-recv.c:2396 msgid "No topic set for " msgstr "Pas de titre défini pour " -#: src/irc/irc-recv.c:2423 +#: src/irc/irc-recv.c:2438 msgid "Topic for " msgstr "Le titre pour " -#: src/irc/irc-recv.c:2427 +#: src/irc/irc-recv.c:2442 #, c-format msgid " is: \"%s\"\n" msgstr " est: \"%s\"\n" -#: src/irc/irc-recv.c:2443 src/irc/irc-recv.c:2523 +#: src/irc/irc-recv.c:2458 src/irc/irc-recv.c:2538 #, c-format msgid "%s cannot identify channel for \"%s\" command\n" msgstr "%s impossible de déterminer le canal pour la commande \"%s\"\n" -#: src/irc/irc-recv.c:2489 +#: src/irc/irc-recv.c:2504 msgid "Topic set by " msgstr "Titre défini par " -#: src/irc/irc-recv.c:2507 +#: src/irc/irc-recv.c:2522 #, c-format msgid "%s cannot identify date/time for \"%s\" command\n" msgstr "%s impossible d'identifier la date/heure pour la commande \"%s\"\n" -#: src/irc/irc-recv.c:2515 +#: src/irc/irc-recv.c:2530 #, c-format msgid "%s cannot identify nickname for \"%s\" command\n" msgstr "" "%s impossible de déterminer le nom d'utilisateur pour la commande \"%s\"\n" -#: src/irc/irc-recv.c:2644 +#: src/irc/irc-recv.c:2659 msgid " on " msgstr " sur " -#: src/irc/irc-recv.c:2751 +#: src/irc/irc-recv.c:2766 #, c-format msgid "%s cannot create nick \"%s\" for channel \"%s\"\n" msgstr "%s impossible de créer l'utilisateur \"%s\" pour le canal \"%s\"\n" -#: src/irc/irc-recv.c:2804 +#: src/irc/irc-recv.c:2819 msgid "Nicks " msgstr "Utilisateurs " -#: src/irc/irc-recv.c:2824 +#: src/irc/irc-recv.c:2839 msgid "Channel " msgstr "Canal " -#: src/irc/irc-recv.c:2835 +#: src/irc/irc-recv.c:2850 msgid "nicks" msgstr "utilisateurs" -#: src/irc/irc-recv.c:2835 +#: src/irc/irc-recv.c:2850 msgid "nick" msgstr "utilisateur" -#: src/irc/irc-recv.c:2843 +#: src/irc/irc-recv.c:2858 msgid "ops" msgstr "ops" -#: src/irc/irc-recv.c:2843 +#: src/irc/irc-recv.c:2858 msgid "op" msgstr "op" -#: src/irc/irc-recv.c:2852 +#: src/irc/irc-recv.c:2867 msgid "halfops" msgstr "halfops" -#: src/irc/irc-recv.c:2852 +#: src/irc/irc-recv.c:2867 msgid "halfop" msgstr "halfop" -#: src/irc/irc-recv.c:2861 +#: src/irc/irc-recv.c:2876 msgid "voices" msgstr "voices" -#: src/irc/irc-recv.c:2861 +#: src/irc/irc-recv.c:2876 msgid "voice" msgstr "voice" -#: src/irc/irc-recv.c:2870 +#: src/irc/irc-recv.c:2885 msgid "normal" msgstr "normal" -#: src/irc/irc-recv.c:2903 +#: src/irc/irc-recv.c:2918 #, c-format msgid "%s: nickname \"%s\" is already in use, trying 2nd nickname \"%s\"\n" msgstr "" "%s: l'utilisateur \"%s\" est déjà en cours d'utilisation, essai avec le 2nd " "nom d'utilisateur \"%s\"\n" -#: src/irc/irc-recv.c:2914 +#: src/irc/irc-recv.c:2929 #, c-format msgid "%s: nickname \"%s\" is already in use, trying 3rd nickname \"%s\"\n" msgstr "" "%s: l'utilisateur \"%s\" est déjà en cours d'utilisation, essai du 3ème nom " "d'utilisateur \"%s\"\n" -#: src/irc/irc-recv.c:2923 +#: src/irc/irc-recv.c:2940 #, c-format msgid "" "%s: all declared nicknames are already in use, closing connection with " @@ -1567,6 +1576,13 @@ msgstr "" "%s: tous les noms d'utilisateurs déclarés sont déjà en cours d'utilisation, " "fermeture de la connexion avec le serveur !\n" +#: src/irc/irc-recv.c:2949 +#, c-format +msgid "%s: nickname \"%s\" is already in use, trying 1st nickname \"%s\"\n" +msgstr "" +"%s: l'utilisateur \"%s\" est déjà en cours d'utilisation, essai avec le 1er " +"nom d'utilisateur \"%s\"\n" + #: src/irc/irc-dcc.c:44 msgid "Waiting" msgstr "Attente" @@ -2065,7 +2081,7 @@ msgstr "Aucun alias défini.\n" msgid "Opened buffers:\n" msgstr "Tampons ouverts:\n" -#: src/common/command.c:858 src/common/command.c:1353 +#: src/common/command.c:858 src/common/command.c:1351 msgid "Server: " msgstr "Serveur: " @@ -2105,87 +2121,91 @@ msgstr "%s buffer \"%s\" non trouvé pour la commande \"%s\"\n" msgid "unknown parameter \"%s\" for \"%s\" command\n" msgstr "paramètre inconnu \"%s\" pour la commande \"%s\"\n" -#: src/common/command.c:1040 +#: src/common/command.c:1039 #, c-format msgid "%s already connected to server \"%s\"!\n" msgstr "%s déjà connecté au serveur \"%s\" !\n" -#: src/common/command.c:1063 src/common/command.c:1098 +#: src/common/command.c:1058 src/common/command.c:1096 #, c-format msgid "%s server \"%s\" not found\n" msgstr "%s serveur \"%s\" non trouvé\n" -#: src/common/command.c:1088 +#: src/common/command.c:1083 #, c-format msgid "%s not connected to server \"%s\"!\n" msgstr "%s non connecté au serveur \"%s\" !\n" -#: src/common/command.c:1117 +#: src/common/command.c:1089 +msgid "Auto-reconnection is cancelled\n" +msgstr "La reconnexion automatique est annulée\n" + +#: src/common/command.c:1115 #, c-format msgid "> List of %s internal commands:\n" msgstr "> Liste des commandes internes %s:\n" -#: src/common/command.c:1122 +#: src/common/command.c:1120 msgid "> List of IRC commands:\n" msgstr "> Liste des commandes IRC:\n" -#: src/common/command.c:1137 +#: src/common/command.c:1135 #, c-format msgid "> Help on %s internal command \"%s\":\n" msgstr "> Aide sur la commande interne %s \"%s\":\n" -#: src/common/command.c:1140 src/common/command.c:1161 +#: src/common/command.c:1138 src/common/command.c:1159 #, c-format msgid "Syntax: /%s %s\n" msgstr "Syntaxe: /%s %s\n" -#: src/common/command.c:1159 +#: src/common/command.c:1157 #, c-format msgid "> Help on IRC command \"%s\":\n" msgstr "> Aide sur la commande IRC \"%s\":\n" -#: src/common/command.c:1175 +#: src/common/command.c:1173 #, c-format msgid "No help available, \"%s\" is an unknown command\n" msgstr "Pas d'aide disponible, la commande \"%s\" est inconnue\n" -#: src/common/command.c:1200 +#: src/common/command.c:1198 msgid "Registered Perl scripts:\n" msgstr "Scripts Perl enregistrés :\n" -#: src/common/command.c:1217 src/common/command.c:1239 -#: src/common/command.c:1261 +#: src/common/command.c:1215 src/common/command.c:1237 +#: src/common/command.c:1259 msgid " (none)\n" msgstr " (aucun)\n" -#: src/common/command.c:1222 +#: src/common/command.c:1220 msgid "Perl message handlers:\n" msgstr "Fonctions Perl pour messages :\n" -#: src/common/command.c:1231 +#: src/common/command.c:1229 #, c-format msgid " IRC(%s) => Perl(%s)\n" msgstr " IRC(%s) => Perl(%s)\n" -#: src/common/command.c:1244 +#: src/common/command.c:1242 msgid "Perl command handlers:\n" msgstr "Commandes Perl :\n" -#: src/common/command.c:1253 +#: src/common/command.c:1251 #, c-format msgid " Command /%s => Perl(%s)\n" msgstr " Commande /%s => Perl(%s)\n" -#: src/common/command.c:1273 +#: src/common/command.c:1271 msgid "Perl scripts unloaded\n" msgstr "Scripts Perl déchargés\n" -#: src/common/command.c:1298 src/common/command.c:1836 +#: src/common/command.c:1296 src/common/command.c:1836 #, c-format msgid "%s unknown option for \"%s\" command\n" msgstr "%s option inconnue pour la commande \"%s\"\n" -#: src/common/command.c:1309 +#: src/common/command.c:1307 msgid "" "WeeChat was build without Perl support.\n" "Please rebuild WeeChat with \"--enable-perl\" option for ./configure script\n" @@ -2194,131 +2214,131 @@ msgstr "" "Merci de reconstruire WeeChat avec l'option \"--enable-perl\" pour le " "script ./configure\n" -#: src/common/command.c:1364 +#: src/common/command.c:1362 msgid "connected" msgstr "connecté" -#: src/common/command.c:1364 +#: src/common/command.c:1362 msgid "not connected" msgstr "non connecté" -#: src/common/command.c:1371 +#: src/common/command.c:1369 #, c-format msgid " Autoconnect: %s%s\n" msgstr " Autoconnect: %s%s\n" -#: src/common/command.c:1372 +#: src/common/command.c:1370 msgid "yes" msgstr "oui" -#: src/common/command.c:1372 +#: src/common/command.c:1370 msgid "no" msgstr "non" -#: src/common/command.c:1374 +#: src/common/command.c:1372 msgid " (temporary server, will not be saved)" msgstr " (serveur temporaire, ne sera pas sauvé)" -#: src/common/command.c:1379 +#: src/common/command.c:1377 #, c-format msgid " Hostname : %s\n" msgstr " Nom/IP : %s\n" -#: src/common/command.c:1384 +#: src/common/command.c:1382 #, c-format msgid " Port : %d\n" msgstr " Port : %d\n" -#: src/common/command.c:1390 +#: src/common/command.c:1388 msgid " Password : (hidden)\n" msgstr " Mot passe : (caché)\n" -#: src/common/command.c:1394 +#: src/common/command.c:1392 msgid " Password : (none)\n" msgstr " Mot passe : (aucun)\n" -#: src/common/command.c:1398 +#: src/common/command.c:1396 #, c-format msgid " Nicks : %s" msgstr " Pseudos : %s" -#: src/common/command.c:1415 +#: src/common/command.c:1413 #, c-format msgid " Username : %s\n" msgstr " Nom utilis.: %s\n" -#: src/common/command.c:1420 +#: src/common/command.c:1418 #, c-format msgid " Realname : %s\n" msgstr " Nom réel : %s\n" -#: src/common/command.c:1426 +#: src/common/command.c:1424 #, c-format msgid " Command : %s\n" msgstr " Commande : %s\n" -#: src/common/command.c:1431 +#: src/common/command.c:1429 msgid " Command : (none)\n" msgstr " Commande : (aucune)\n" -#: src/common/command.c:1436 +#: src/common/command.c:1434 #, c-format msgid " Auto-join : %s\n" msgstr " Auto-join : %s\n" -#: src/common/command.c:1441 +#: src/common/command.c:1439 msgid " Auto-join : (none)\n" msgstr " Auto-join : (aucun)\n" -#: src/common/command.c:1445 +#: src/common/command.c:1443 msgid "No server.\n" msgstr "Pas de serveur.\n" -#: src/common/command.c:1454 +#: src/common/command.c:1452 #, c-format msgid "%s missing servername for \"%s\" command\n" msgstr "%s il manque le nom du serveur pour la commande \"%s\"\n" -#: src/common/command.c:1460 +#: src/common/command.c:1458 #, c-format msgid "%s too much arguments for \"%s\" command, ignoring arguments\n" msgstr "%s trop de paramètres pour la commande \"%s\", paramètres ignorés\n" -#: src/common/command.c:1477 +#: src/common/command.c:1475 #, c-format msgid "%s server \"%s\" not found for \"%s\" command\n" msgstr "%s le serveur \"%s\" n'existe pas pour la commande \"%s\"\n" -#: src/common/command.c:1483 src/common/command.c:1614 +#: src/common/command.c:1481 src/common/command.c:1614 msgid "Server" msgstr "Serveur" -#: src/common/command.c:1486 +#: src/common/command.c:1484 msgid "has been deleted\n" msgstr "a été supprimé\n" -#: src/common/command.c:1500 +#: src/common/command.c:1498 #, c-format msgid "%s missing parameters for \"%s\" command\n" msgstr "%s paramètres manquants pour la commande \"%s\"\n" -#: src/common/command.c:1509 +#: src/common/command.c:1507 #, c-format msgid "%s server \"%s\" already exists, can't create it!\n" msgstr "%s le serveur \"%s\" existe déjà, impossible de le créer !\n" -#: src/common/command.c:1533 src/common/command.c:1559 -#: src/common/command.c:1571 src/common/command.c:1595 +#: src/common/command.c:1531 src/common/command.c:1557 +#: src/common/command.c:1569 src/common/command.c:1593 #, c-format msgid "%s missing password for \"%s\" parameter\n" msgstr "%s mot de passe manquant pour le paramètre \"%s\"\n" -#: src/common/command.c:1545 +#: src/common/command.c:1543 #, c-format msgid "%s missing nick(s) for \"%s\" parameter\n" msgstr "%s pseudo(s) manquant(s) pour le paramètre \"%s\"\n" -#: src/common/command.c:1583 +#: src/common/command.c:1581 #, c-format msgid "%s missing command for \"%s\" parameter\n" msgstr "%s commande manquante pour le paramètre \"%s\"\n" @@ -2456,52 +2476,52 @@ msgstr "" msgid "%s invalid syntax for IRC server ('%s'), ignored\n" msgstr "%s syntaxe invalide pour le serveur IRC ('%s'), ignoré\n" -#: src/common/weechat.c:236 +#: src/common/weechat.c:238 #, c-format msgid "%s unable to create server ('%s'), ignored\n" msgstr "%s impossible de créer le serveur ('%s'), ignoré\n" -#: src/common/weechat.c:245 +#: src/common/weechat.c:247 #, c-format msgid "%s unknown parameter '%s', ignored\n" msgstr "%s paramètre inconnu '%s', ignoré\n" -#: src/common/weechat.c:265 +#: src/common/weechat.c:267 #, c-format msgid "%s cannot create directory \"%s\"\n" msgstr "%s impossible de créer le répertoire \"%s\"\n" -#: src/common/weechat.c:291 +#: src/common/weechat.c:293 #, c-format msgid "%s unable to get HOME directory\n" msgstr "%s impossible de lire le répertoire personnel\n" -#: src/common/weechat.c:300 +#: src/common/weechat.c:302 #, c-format msgid "%s not enough memory for home directory\n" msgstr "%s pas assez de mémoire pour le répertoire personnel\n" -#: src/common/weechat.c:310 +#: src/common/weechat.c:312 #, c-format msgid "%s unable to create ~/.weechat directory\n" msgstr "%s impossible de créer le répertoire ~/.weechat\n" -#: src/common/weechat.c:362 +#: src/common/weechat.c:364 #, c-format msgid "%s unable to create ~/.weechat/logs directory\n" msgstr "%s impossible de créer le répertoire ~/.weechat/logs\n" -#: src/common/weechat.c:397 +#: src/common/weechat.c:399 #, c-format msgid "%s unable to create/append to log file (~/.weechat/%s)" msgstr "%s impossible de créer/ajouter dans le fichier de log (~/.weechat/%s)" -#: src/common/weechat.c:420 +#: src/common/weechat.c:422 #, c-format msgid "%sWelcome to " msgstr "%sBienvenue dans " -#: src/common/weechat.c:433 +#: src/common/weechat.c:435 msgid "compiled on" msgstr "compilé le" @@ -3056,50 +3076,66 @@ msgid "automatically connect to server when WeeChat is starting" msgstr "connexion automatique au serveur quand WeeChat démarre" #: src/common/weeconfig.c:537 +msgid "automatically reconnect to server" +msgstr "reconnexion automatique au serveur" + +#: src/common/weeconfig.c:538 +msgid "automatically reconnect to server when disconnected" +msgstr "reconnexion automatique au serveur après une déconnexion" + +#: src/common/weeconfig.c:541 +msgid "delay before trying again to reconnect" +msgstr "délai avant de tenter une reconnexion" + +#: src/common/weeconfig.c:542 +msgid "delay (in deconds) before trying again to reconnect to server" +msgstr "délai (en secondes) avant de tenter une reconnexion au serveur" + +#: src/common/weeconfig.c:545 msgid "server address or hostname" msgstr "adresse ou nom du serveur" -#: src/common/weeconfig.c:538 +#: src/common/weeconfig.c:546 msgid "IP address or hostname of IRC server" msgstr "adresse IP ou nom du serveur IRC" -#: src/common/weeconfig.c:541 +#: src/common/weeconfig.c:549 msgid "port for IRC server" msgstr "port pour le serveur IRC" -#: src/common/weeconfig.c:542 +#: src/common/weeconfig.c:550 msgid "port for connecting to server" msgstr "port pour se connecter au serveur" -#: src/common/weeconfig.c:545 +#: src/common/weeconfig.c:553 msgid "server password" msgstr "mot de passe pour le serveur" -#: src/common/weeconfig.c:546 +#: src/common/weeconfig.c:554 msgid "password for IRC server" msgstr "mot de passe pour le serveur IRC" -#: src/common/weeconfig.c:549 +#: src/common/weeconfig.c:557 msgid "nickname for server" msgstr "pseudo pour le serveur" -#: src/common/weeconfig.c:550 +#: src/common/weeconfig.c:558 msgid "nickname to use on IRC server" msgstr "pseudo à utiliser sur le serveur IRC" -#: src/common/weeconfig.c:553 +#: src/common/weeconfig.c:561 msgid "alternate nickname for server" msgstr "pseudo alternatif pour le serveur" -#: src/common/weeconfig.c:554 +#: src/common/weeconfig.c:562 msgid "alternate nickname to use on IRC server (if nickname is already used)" msgstr "pseudo alternatif pour le serveur IRC (si le pseudo est déjà utilisé)" -#: src/common/weeconfig.c:557 +#: src/common/weeconfig.c:565 msgid "2nd alternate nickname for server" msgstr "2nd pseudo alternatif pour le serveur" -#: src/common/weeconfig.c:558 +#: src/common/weeconfig.c:566 msgid "" "2nd alternate nickname to use on IRC server (if alternate nickname is " "already used)" @@ -3107,31 +3143,31 @@ msgstr "" "2nd pseudo alternatif pour le serveur IRC (si le pseudo alternatif est déjà " "utilisé)" -#: src/common/weeconfig.c:561 +#: src/common/weeconfig.c:569 msgid "user name for server" msgstr "nom d'utilisateur pour le serveur" -#: src/common/weeconfig.c:562 +#: src/common/weeconfig.c:570 msgid "user name to use on IRC server" msgstr "nom d'utilisateur pour le serveur IRC" -#: src/common/weeconfig.c:565 +#: src/common/weeconfig.c:573 msgid "real name for server" msgstr "nom réel pour le serveur" -#: src/common/weeconfig.c:566 +#: src/common/weeconfig.c:574 msgid "real name to use on IRC server" msgstr "nom réel pour le serveur IRC" -#: src/common/weeconfig.c:569 src/common/weeconfig.c:570 +#: src/common/weeconfig.c:577 src/common/weeconfig.c:578 msgid "first command to run when connected to server" msgstr "commande à exécuter en premier lorsque connecté au serveur" -#: src/common/weeconfig.c:573 +#: src/common/weeconfig.c:581 msgid "delay (in seconds) after command was executed" msgstr "délai (en secondes) après exécution de la commande" -#: src/common/weeconfig.c:574 +#: src/common/weeconfig.c:582 msgid "" "delay (in seconds) after command was executed (example: give some time for " "authentication)" @@ -3139,71 +3175,71 @@ msgstr "" "délai (en secondes) après exécution de la commande (exemple: donner du temps " "pour l'authentification)" -#: src/common/weeconfig.c:577 +#: src/common/weeconfig.c:585 msgid "list of channels to join when connected to server" msgstr "liste des canaux à rejoindre lorsque connecté au serveur" -#: src/common/weeconfig.c:578 +#: src/common/weeconfig.c:586 msgid "comma separated list of channels to join when connected to server" msgstr "" "liste des canaux (séparés par des virgules) à rejoindre lorsque connecté au " "serveur" -#: src/common/weeconfig.c:581 src/common/weeconfig.c:582 +#: src/common/weeconfig.c:589 src/common/weeconfig.c:590 msgid "automatically rejoin channels when kicked" msgstr "rejoindre automatiquement les canaux quand mis dehors" -#: src/common/weeconfig.c:804 +#: src/common/weeconfig.c:812 #, c-format msgid "%s %s, line %d: new server, but previous was incomplete\n" msgstr "%s %s, ligne %d: nouveau serveur, mais le précédent était incomplet\n" -#: src/common/weeconfig.c:813 +#: src/common/weeconfig.c:821 #, c-format msgid "%s %s, line %d: server '%s' already exists\n" msgstr "%s %s, ligne %d: le serveur '%s' existe déjà\n" -#: src/common/weeconfig.c:826 +#: src/common/weeconfig.c:835 #, c-format msgid "%s %s, line %d: unable to create server\n" msgstr "%s %s, ligne %d: impossible de créer le serveur\n" -#: src/common/weeconfig.c:865 +#: src/common/weeconfig.c:874 #, c-format msgid "%s unable to assign default int with string (\"%s\")\n" msgstr "%s impossible d'assigner la valeur entière avec la chaîne (\"%s\")\n" -#: src/common/weeconfig.c:876 +#: src/common/weeconfig.c:885 #, c-format msgid "%s unable to assign default color (\"%s\")\n" msgstr "%s impossible d'assigner la couleur par défaut (\"%s\")\n" -#: src/common/weeconfig.c:915 +#: src/common/weeconfig.c:924 #, c-format msgid "%s config file \"%s\" not found.\n" msgstr "%s fichier de configuration \"%s\" non trouvé.\n" -#: src/common/weeconfig.c:947 +#: src/common/weeconfig.c:956 #, c-format msgid "%s %s, line %d: invalid syntax, missing \"]\"\n" msgstr "%s %s, ligne %d: syntaxe invalide, il manque \"]\"\n" -#: src/common/weeconfig.c:964 +#: src/common/weeconfig.c:973 #, c-format msgid "%s %s, line %d: unknown section identifier (\"%s\")\n" msgstr "%s %s, ligne %d: section inconnue (\"%s\")\n" -#: src/common/weeconfig.c:982 +#: src/common/weeconfig.c:991 #, c-format msgid "%s %s, line %d: invalid syntax, missing \"=\"\n" msgstr "%s %s, ligne %d: syntaxe invalide, il manque \"=\"\n" -#: src/common/weeconfig.c:1016 +#: src/common/weeconfig.c:1025 #, c-format msgid "%s %s, line %d: invalid option \"%s\"\n" msgstr "%s %s, ligne %d: option \"%s\" invalide\n" -#: src/common/weeconfig.c:1027 +#: src/common/weeconfig.c:1036 #, c-format msgid "" "%s %s, line %d: invalid value foroption '%s'\n" @@ -3212,7 +3248,7 @@ msgstr "" "%s %s, ligne %d: valeur invalide pour l'option '%s'\n" "Attendu: valeur booléenne: 'off' ou 'on'\n" -#: src/common/weeconfig.c:1036 +#: src/common/weeconfig.c:1045 #, c-format msgid "" "%s %s, line %d: invalid value for option '%s'\n" @@ -3221,7 +3257,7 @@ msgstr "" "%s %s, ligne %d: valeur invalide pour l'option '%s'\n" "Attendu: entier compris entre %d et %d\n" -#: src/common/weeconfig.c:1047 +#: src/common/weeconfig.c:1056 #, c-format msgid "" "%s %s, line %d: invalid value for option '%s'\n" @@ -3230,26 +3266,26 @@ msgstr "" "%s %s, ligne %d: valeur invalide pour l'option '%s'\n" "Attendu: une de ces chaînes: " -#: src/common/weeconfig.c:1063 +#: src/common/weeconfig.c:1072 #, c-format msgid "%s %s, line %d: invalid color name for option '%s'\n" msgstr "%s %s, ligne %d: nom de couleur invalide pour l'option '%s'\n" -#: src/common/weeconfig.c:1122 src/common/weeconfig.c:1291 +#: src/common/weeconfig.c:1131 src/common/weeconfig.c:1300 #, c-format msgid "%s cannot create file \"%s\"\n" msgstr "%s impossible de créer le fichier \"%s\"\n" -#: src/common/weeconfig.c:1128 +#: src/common/weeconfig.c:1137 #, c-format msgid "%s: creating default config file...\n" msgstr "%s: création du fichier de configuration par défaut...\n" -#: src/common/weeconfig.c:1129 +#: src/common/weeconfig.c:1138 msgid "creating default config file\n" msgstr "création du fichier de configuration par défaut\n" -#: src/common/weeconfig.c:1132 src/common/weeconfig.c:1300 +#: src/common/weeconfig.c:1141 src/common/weeconfig.c:1309 #, c-format msgid "" "#\n" @@ -3258,36 +3294,6 @@ msgstr "" "#\n" "# %s: fichier de configuration, créé par %s v%s le %s#\n" -#: src/common/weeconfig.c:1297 +#: src/common/weeconfig.c:1306 msgid "saving config to disk\n" msgstr "sauvegarde de la configuration sur disque\n" - -#~ msgid "name for log files" -#~ msgstr "nom des conversations sauvegardées" - -#~ msgid "" -#~ "name for log files (%S == irc server name, %N == channel name (or " -#~ "nickname if private chat)" -#~ msgstr "" -#~ "nom des conversations saivegardées (%S == nom du serveur irc, %N == nom " -#~ "du canal (ou pseudo si fenêtre privée)" - -#~ msgid "start string for log files" -#~ msgstr "chaîne de début pour les conversations sauvegardées" - -#~ msgid "" -#~ "text written when starting new log file (see man strftime for date/time " -#~ "specifiers)" -#~ msgstr "" -#~ "texte écrit en démarrant la sauvegarde d'une discussion (voir man " -#~ "strftime pour le format de date/heure)" - -#~ msgid "end string for log files" -#~ msgstr "chaîne de fin pour les conversations sauvegardées" - -#~ msgid "" -#~ "text written when ending log file (see man strftime for date/time " -#~ "specifiers)" -#~ msgstr "" -#~ "texte écrit à la fin d'une discussion sauvegardées (voir man strftime " -#~ "pour le format de date/heure)" diff --git a/po/weechat.pot b/po/weechat.pot index 2cb13fe6d..966b592b4 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: 2004-12-27 13:52+0100\n" +"POT-Creation-Date: 2004-12-27 17:09+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" @@ -20,95 +20,104 @@ msgstr "" msgid "%s cannot allocate new nick\n" msgstr "" -#: src/irc/irc-server.c:130 src/common/weeconfig.c:1241 +#: src/irc/irc-server.c:134 src/common/weeconfig.c:1250 msgid "Unable to get user's name" msgstr "" -#: src/irc/irc-server.c:195 +#: src/irc/irc-server.c:199 #, c-format msgid "%s cannot allocate new server\n" msgstr "" -#: src/irc/irc-server.c:386 +#: src/irc/irc-server.c:393 #, c-format msgid "%s error sending data to IRC server\n" msgstr "" -#: src/irc/irc-server.c:403 src/irc/irc-server.c:414 src/irc/irc-server.c:468 +#: src/irc/irc-server.c:410 src/irc/irc-server.c:421 src/irc/irc-server.c:475 #, c-format msgid "%s not enough memory for received IRC message\n" msgstr "" -#: src/irc/irc-server.c:475 +#: src/irc/irc-server.c:482 #, c-format msgid "%s unable to explode received buffer\n" msgstr "" -#: src/irc/irc-server.c:548 +#: src/irc/irc-server.c:555 #, c-format msgid "Command '%s' failed!\n" msgstr "" -#: src/irc/irc-server.c:552 +#: src/irc/irc-server.c:559 msgid "No command to execute!\n" msgstr "" -#: src/irc/irc-server.c:556 +#: src/irc/irc-server.c:563 #, c-format msgid "Unknown command: cmd=%s, args=%s\n" msgstr "" -#: src/irc/irc-server.c:594 +#: src/irc/irc-server.c:601 #, c-format msgid "%s cannot read data from socket, disconnecting from server...\n" msgstr "" -#: src/irc/irc-server.c:614 +#: src/irc/irc-server.c:622 #, c-format msgid "%s: connecting to %s:%d...\n" msgstr "" -#: src/irc/irc-server.c:616 +#: src/irc/irc-server.c:624 #, c-format msgid "connecting to server %s:%d...\n" msgstr "" -#: src/irc/irc-server.c:624 +#: src/irc/irc-server.c:632 #, c-format msgid "%s cannot create pipe\n" msgstr "" -#: src/irc/irc-server.c:638 +#: src/irc/irc-server.c:646 #, c-format msgid "%s cannot set socket option \"SO_REUSEADDR\"\n" msgstr "" -#: src/irc/irc-server.c:645 +#: src/irc/irc-server.c:653 #, c-format msgid "%s cannot set socket option \"SO_KEEPALIVE\"\n" msgstr "" -#: src/irc/irc-server.c:653 +#: src/irc/irc-server.c:661 #, c-format msgid "%s address \"%s\" not found\n" msgstr "" -#: src/irc/irc-server.c:676 +#: src/irc/irc-server.c:684 #, c-format msgid "%s IP address not found\n" msgstr "" -#: src/irc/irc-server.c:686 +#: src/irc/irc-server.c:694 #, c-format msgid "%s: server IP is: %s\n" msgstr "" -#: src/irc/irc-server.c:692 +#: src/irc/irc-server.c:700 #, c-format msgid "%s cannot connect to irc server\n" msgstr "" -#: src/irc/irc-server.c:741 +#: src/irc/irc-server.c:718 +msgid "Reconnecting to server...\n" +msgstr "" + +#: src/irc/irc-server.c:729 src/irc/irc-server.c:798 +#, c-format +msgid "Reconnecting to server in %d seconds\n" +msgstr "" + +#: src/irc/irc-server.c:773 msgid "Disconnected from server!\n" msgstr "" @@ -1051,7 +1060,7 @@ msgstr "" msgid "can't change mode for other users" msgstr "" -#: src/irc/irc-send.c:58 src/irc/irc-recv.c:2934 +#: src/irc/irc-send.c:58 src/irc/irc-recv.c:2961 msgid "unknown" msgstr "" @@ -1083,7 +1092,7 @@ msgstr "" msgid "%s cannot create new private window \"%s\"\n" msgstr "" -#: src/irc/irc-send.c:670 src/irc/irc-send.c:741 src/common/command.c:1304 +#: src/irc/irc-send.c:670 src/irc/irc-send.c:741 src/common/command.c:1302 #, c-format msgid "%s wrong argument count for \"%s\" command\n" msgstr "" @@ -1103,7 +1112,7 @@ msgid " has joined " msgstr "" #: src/irc/irc-recv.c:229 src/irc/irc-recv.c:593 src/irc/irc-recv.c:899 -#: src/irc/irc-recv.c:1039 src/irc/irc-recv.c:2434 src/irc/irc-recv.c:2499 +#: src/irc/irc-recv.c:1039 src/irc/irc-recv.c:2449 src/irc/irc-recv.c:2514 #, c-format msgid "%s channel not found for \"%s\" command\n" msgstr "" @@ -1277,8 +1286,8 @@ msgid "from" msgstr "" #: src/irc/irc-recv.c:1123 src/irc/irc-recv.c:1137 src/irc/irc-recv.c:1152 -#: src/irc/irc-recv.c:1167 src/irc/irc-recv.c:1261 src/irc/irc-recv.c:2720 -#: src/irc/irc-recv.c:2760 +#: src/irc/irc-recv.c:1167 src/irc/irc-recv.c:1261 src/irc/irc-recv.c:2735 +#: src/irc/irc-recv.c:2775 #, c-format msgid "%s cannot parse \"%s\" command\n" msgstr "" @@ -1310,161 +1319,166 @@ msgstr "" msgid " has unset topic for " msgstr "" -#: src/irc/irc-recv.c:1570 +#: src/irc/irc-recv.c:1585 #, c-format msgid " is away: %s\n" msgstr "" -#: src/irc/irc-recv.c:1644 +#: src/irc/irc-recv.c:1659 msgid "Users online: " msgstr "" -#: src/irc/irc-recv.c:2007 +#: src/irc/irc-recv.c:2022 msgid "idle: " msgstr "" -#: src/irc/irc-recv.c:2015 +#: src/irc/irc-recv.c:2030 msgid "days" msgstr "" -#: src/irc/irc-recv.c:2015 +#: src/irc/irc-recv.c:2030 msgid "day" msgstr "" -#: src/irc/irc-recv.c:2025 +#: src/irc/irc-recv.c:2040 msgid "hours" msgstr "" -#: src/irc/irc-recv.c:2025 +#: src/irc/irc-recv.c:2040 msgid "hour" msgstr "" -#: src/irc/irc-recv.c:2031 +#: src/irc/irc-recv.c:2046 msgid "minutes" msgstr "" -#: src/irc/irc-recv.c:2031 +#: src/irc/irc-recv.c:2046 msgid "minute" msgstr "" -#: src/irc/irc-recv.c:2037 +#: src/irc/irc-recv.c:2052 msgid "seconds" msgstr "" -#: src/irc/irc-recv.c:2037 +#: src/irc/irc-recv.c:2052 msgid "second" msgstr "" -#: src/irc/irc-recv.c:2042 +#: src/irc/irc-recv.c:2057 msgid "signon at: " msgstr "" -#: src/irc/irc-recv.c:2130 +#: src/irc/irc-recv.c:2145 msgid "Channels: " msgstr "" -#: src/irc/irc-recv.c:2381 +#: src/irc/irc-recv.c:2396 msgid "No topic set for " msgstr "" -#: src/irc/irc-recv.c:2423 +#: src/irc/irc-recv.c:2438 msgid "Topic for " msgstr "" -#: src/irc/irc-recv.c:2427 +#: src/irc/irc-recv.c:2442 #, c-format msgid " is: \"%s\"\n" msgstr "" -#: src/irc/irc-recv.c:2443 src/irc/irc-recv.c:2523 +#: src/irc/irc-recv.c:2458 src/irc/irc-recv.c:2538 #, c-format msgid "%s cannot identify channel for \"%s\" command\n" msgstr "" -#: src/irc/irc-recv.c:2489 +#: src/irc/irc-recv.c:2504 msgid "Topic set by " msgstr "" -#: src/irc/irc-recv.c:2507 +#: src/irc/irc-recv.c:2522 #, c-format msgid "%s cannot identify date/time for \"%s\" command\n" msgstr "" -#: src/irc/irc-recv.c:2515 +#: src/irc/irc-recv.c:2530 #, c-format msgid "%s cannot identify nickname for \"%s\" command\n" msgstr "" -#: src/irc/irc-recv.c:2644 +#: src/irc/irc-recv.c:2659 msgid " on " msgstr "" -#: src/irc/irc-recv.c:2751 +#: src/irc/irc-recv.c:2766 #, c-format msgid "%s cannot create nick \"%s\" for channel \"%s\"\n" msgstr "" -#: src/irc/irc-recv.c:2804 +#: src/irc/irc-recv.c:2819 msgid "Nicks " msgstr "" -#: src/irc/irc-recv.c:2824 +#: src/irc/irc-recv.c:2839 msgid "Channel " msgstr "" -#: src/irc/irc-recv.c:2835 +#: src/irc/irc-recv.c:2850 msgid "nicks" msgstr "" -#: src/irc/irc-recv.c:2835 +#: src/irc/irc-recv.c:2850 msgid "nick" msgstr "" -#: src/irc/irc-recv.c:2843 +#: src/irc/irc-recv.c:2858 msgid "ops" msgstr "" -#: src/irc/irc-recv.c:2843 +#: src/irc/irc-recv.c:2858 msgid "op" msgstr "" -#: src/irc/irc-recv.c:2852 +#: src/irc/irc-recv.c:2867 msgid "halfops" msgstr "" -#: src/irc/irc-recv.c:2852 +#: src/irc/irc-recv.c:2867 msgid "halfop" msgstr "" -#: src/irc/irc-recv.c:2861 +#: src/irc/irc-recv.c:2876 msgid "voices" msgstr "" -#: src/irc/irc-recv.c:2861 +#: src/irc/irc-recv.c:2876 msgid "voice" msgstr "" -#: src/irc/irc-recv.c:2870 +#: src/irc/irc-recv.c:2885 msgid "normal" msgstr "" -#: src/irc/irc-recv.c:2903 +#: src/irc/irc-recv.c:2918 #, c-format msgid "%s: nickname \"%s\" is already in use, trying 2nd nickname \"%s\"\n" msgstr "" -#: src/irc/irc-recv.c:2914 +#: src/irc/irc-recv.c:2929 #, c-format msgid "%s: nickname \"%s\" is already in use, trying 3rd nickname \"%s\"\n" msgstr "" -#: src/irc/irc-recv.c:2923 +#: src/irc/irc-recv.c:2940 #, c-format msgid "" "%s: all declared nicknames are already in use, closing connection with " "server!\n" msgstr "" +#: src/irc/irc-recv.c:2949 +#, c-format +msgid "%s: nickname \"%s\" is already in use, trying 1st nickname \"%s\"\n" +msgstr "" + #: src/irc/irc-dcc.c:44 msgid "Waiting" msgstr "" @@ -1917,7 +1931,7 @@ msgstr "" msgid "Opened buffers:\n" msgstr "" -#: src/common/command.c:858 src/common/command.c:1353 +#: src/common/command.c:858 src/common/command.c:1351 msgid "Server: " msgstr "" @@ -1957,217 +1971,221 @@ msgstr "" msgid "unknown parameter \"%s\" for \"%s\" command\n" msgstr "" -#: src/common/command.c:1040 +#: src/common/command.c:1039 #, c-format msgid "%s already connected to server \"%s\"!\n" msgstr "" -#: src/common/command.c:1063 src/common/command.c:1098 +#: src/common/command.c:1058 src/common/command.c:1096 #, c-format msgid "%s server \"%s\" not found\n" msgstr "" -#: src/common/command.c:1088 +#: src/common/command.c:1083 #, c-format msgid "%s not connected to server \"%s\"!\n" msgstr "" -#: src/common/command.c:1117 +#: src/common/command.c:1089 +msgid "Auto-reconnection is cancelled\n" +msgstr "" + +#: src/common/command.c:1115 #, c-format msgid "> List of %s internal commands:\n" msgstr "" -#: src/common/command.c:1122 +#: src/common/command.c:1120 msgid "> List of IRC commands:\n" msgstr "" -#: src/common/command.c:1137 +#: src/common/command.c:1135 #, c-format msgid "> Help on %s internal command \"%s\":\n" msgstr "" -#: src/common/command.c:1140 src/common/command.c:1161 +#: src/common/command.c:1138 src/common/command.c:1159 #, c-format msgid "Syntax: /%s %s\n" msgstr "" -#: src/common/command.c:1159 +#: src/common/command.c:1157 #, c-format msgid "> Help on IRC command \"%s\":\n" msgstr "" -#: src/common/command.c:1175 +#: src/common/command.c:1173 #, c-format msgid "No help available, \"%s\" is an unknown command\n" msgstr "" -#: src/common/command.c:1200 +#: src/common/command.c:1198 msgid "Registered Perl scripts:\n" msgstr "" -#: src/common/command.c:1217 src/common/command.c:1239 -#: src/common/command.c:1261 +#: src/common/command.c:1215 src/common/command.c:1237 +#: src/common/command.c:1259 msgid " (none)\n" msgstr "" -#: src/common/command.c:1222 +#: src/common/command.c:1220 msgid "Perl message handlers:\n" msgstr "" -#: src/common/command.c:1231 +#: src/common/command.c:1229 #, c-format msgid " IRC(%s) => Perl(%s)\n" msgstr "" -#: src/common/command.c:1244 +#: src/common/command.c:1242 msgid "Perl command handlers:\n" msgstr "" -#: src/common/command.c:1253 +#: src/common/command.c:1251 #, c-format msgid " Command /%s => Perl(%s)\n" msgstr "" -#: src/common/command.c:1273 +#: src/common/command.c:1271 msgid "Perl scripts unloaded\n" msgstr "" -#: src/common/command.c:1298 src/common/command.c:1836 +#: src/common/command.c:1296 src/common/command.c:1836 #, c-format msgid "%s unknown option for \"%s\" command\n" msgstr "" -#: src/common/command.c:1309 +#: src/common/command.c:1307 msgid "" "WeeChat was build without Perl support.\n" "Please rebuild WeeChat with \"--enable-perl\" option for ./configure script\n" msgstr "" -#: src/common/command.c:1364 +#: src/common/command.c:1362 msgid "connected" msgstr "" -#: src/common/command.c:1364 +#: src/common/command.c:1362 msgid "not connected" msgstr "" -#: src/common/command.c:1371 +#: src/common/command.c:1369 #, c-format msgid " Autoconnect: %s%s\n" msgstr "" -#: src/common/command.c:1372 +#: src/common/command.c:1370 msgid "yes" msgstr "" -#: src/common/command.c:1372 +#: src/common/command.c:1370 msgid "no" msgstr "" -#: src/common/command.c:1374 +#: src/common/command.c:1372 msgid " (temporary server, will not be saved)" msgstr "" -#: src/common/command.c:1379 +#: src/common/command.c:1377 #, c-format msgid " Hostname : %s\n" msgstr "" -#: src/common/command.c:1384 +#: src/common/command.c:1382 #, c-format msgid " Port : %d\n" msgstr "" -#: src/common/command.c:1390 +#: src/common/command.c:1388 msgid " Password : (hidden)\n" msgstr "" -#: src/common/command.c:1394 +#: src/common/command.c:1392 msgid " Password : (none)\n" msgstr "" -#: src/common/command.c:1398 +#: src/common/command.c:1396 #, c-format msgid " Nicks : %s" msgstr "" -#: src/common/command.c:1415 +#: src/common/command.c:1413 #, c-format msgid " Username : %s\n" msgstr "" -#: src/common/command.c:1420 +#: src/common/command.c:1418 #, c-format msgid " Realname : %s\n" msgstr "" -#: src/common/command.c:1426 +#: src/common/command.c:1424 #, c-format msgid " Command : %s\n" msgstr "" -#: src/common/command.c:1431 +#: src/common/command.c:1429 msgid " Command : (none)\n" msgstr "" -#: src/common/command.c:1436 +#: src/common/command.c:1434 #, c-format msgid " Auto-join : %s\n" msgstr "" -#: src/common/command.c:1441 +#: src/common/command.c:1439 msgid " Auto-join : (none)\n" msgstr "" -#: src/common/command.c:1445 +#: src/common/command.c:1443 msgid "No server.\n" msgstr "" -#: src/common/command.c:1454 +#: src/common/command.c:1452 #, c-format msgid "%s missing servername for \"%s\" command\n" msgstr "" -#: src/common/command.c:1460 +#: src/common/command.c:1458 #, c-format msgid "%s too much arguments for \"%s\" command, ignoring arguments\n" msgstr "" -#: src/common/command.c:1477 +#: src/common/command.c:1475 #, c-format msgid "%s server \"%s\" not found for \"%s\" command\n" msgstr "" -#: src/common/command.c:1483 src/common/command.c:1614 +#: src/common/command.c:1481 src/common/command.c:1614 msgid "Server" msgstr "" -#: src/common/command.c:1486 +#: src/common/command.c:1484 msgid "has been deleted\n" msgstr "" -#: src/common/command.c:1500 +#: src/common/command.c:1498 #, c-format msgid "%s missing parameters for \"%s\" command\n" msgstr "" -#: src/common/command.c:1509 +#: src/common/command.c:1507 #, c-format msgid "%s server \"%s\" already exists, can't create it!\n" msgstr "" -#: src/common/command.c:1533 src/common/command.c:1559 -#: src/common/command.c:1571 src/common/command.c:1595 +#: src/common/command.c:1531 src/common/command.c:1557 +#: src/common/command.c:1569 src/common/command.c:1593 #, c-format msgid "%s missing password for \"%s\" parameter\n" msgstr "" -#: src/common/command.c:1545 +#: src/common/command.c:1543 #, c-format msgid "%s missing nick(s) for \"%s\" parameter\n" msgstr "" -#: src/common/command.c:1583 +#: src/common/command.c:1581 #, c-format msgid "%s missing command for \"%s\" parameter\n" msgstr "" @@ -2297,52 +2315,52 @@ msgstr "" msgid "%s invalid syntax for IRC server ('%s'), ignored\n" msgstr "" -#: src/common/weechat.c:236 +#: src/common/weechat.c:238 #, c-format msgid "%s unable to create server ('%s'), ignored\n" msgstr "" -#: src/common/weechat.c:245 +#: src/common/weechat.c:247 #, c-format msgid "%s unknown parameter '%s', ignored\n" msgstr "" -#: src/common/weechat.c:265 +#: src/common/weechat.c:267 #, c-format msgid "%s cannot create directory \"%s\"\n" msgstr "" -#: src/common/weechat.c:291 +#: src/common/weechat.c:293 #, c-format msgid "%s unable to get HOME directory\n" msgstr "" -#: src/common/weechat.c:300 +#: src/common/weechat.c:302 #, c-format msgid "%s not enough memory for home directory\n" msgstr "" -#: src/common/weechat.c:310 +#: src/common/weechat.c:312 #, c-format msgid "%s unable to create ~/.weechat directory\n" msgstr "" -#: src/common/weechat.c:362 +#: src/common/weechat.c:364 #, c-format msgid "%s unable to create ~/.weechat/logs directory\n" msgstr "" -#: src/common/weechat.c:397 +#: src/common/weechat.c:399 #, c-format msgid "%s unable to create/append to log file (~/.weechat/%s)" msgstr "" -#: src/common/weechat.c:420 +#: src/common/weechat.c:422 #, c-format msgid "%sWelcome to " msgstr "" -#: src/common/weechat.c:433 +#: src/common/weechat.c:435 msgid "compiled on" msgstr "" @@ -2865,194 +2883,210 @@ msgid "automatically connect to server when WeeChat is starting" msgstr "" #: src/common/weeconfig.c:537 -msgid "server address or hostname" +msgid "automatically reconnect to server" msgstr "" #: src/common/weeconfig.c:538 -msgid "IP address or hostname of IRC server" +msgid "automatically reconnect to server when disconnected" msgstr "" #: src/common/weeconfig.c:541 -msgid "port for IRC server" +msgid "delay before trying again to reconnect" msgstr "" #: src/common/weeconfig.c:542 -msgid "port for connecting to server" +msgid "delay (in deconds) before trying again to reconnect to server" msgstr "" #: src/common/weeconfig.c:545 -msgid "server password" +msgid "server address or hostname" msgstr "" #: src/common/weeconfig.c:546 -msgid "password for IRC server" +msgid "IP address or hostname of IRC server" msgstr "" #: src/common/weeconfig.c:549 -msgid "nickname for server" +msgid "port for IRC server" msgstr "" #: src/common/weeconfig.c:550 -msgid "nickname to use on IRC server" +msgid "port for connecting to server" msgstr "" #: src/common/weeconfig.c:553 -msgid "alternate nickname for server" +msgid "server password" msgstr "" #: src/common/weeconfig.c:554 -msgid "alternate nickname to use on IRC server (if nickname is already used)" +msgid "password for IRC server" msgstr "" #: src/common/weeconfig.c:557 -msgid "2nd alternate nickname for server" +msgid "nickname for server" msgstr "" #: src/common/weeconfig.c:558 +msgid "nickname to use on IRC server" +msgstr "" + +#: src/common/weeconfig.c:561 +msgid "alternate nickname for server" +msgstr "" + +#: src/common/weeconfig.c:562 +msgid "alternate nickname to use on IRC server (if nickname is already used)" +msgstr "" + +#: src/common/weeconfig.c:565 +msgid "2nd alternate nickname for server" +msgstr "" + +#: src/common/weeconfig.c:566 msgid "" "2nd alternate nickname to use on IRC server (if alternate nickname is " "already used)" msgstr "" -#: src/common/weeconfig.c:561 +#: src/common/weeconfig.c:569 msgid "user name for server" msgstr "" -#: src/common/weeconfig.c:562 +#: src/common/weeconfig.c:570 msgid "user name to use on IRC server" msgstr "" -#: src/common/weeconfig.c:565 +#: src/common/weeconfig.c:573 msgid "real name for server" msgstr "" -#: src/common/weeconfig.c:566 +#: src/common/weeconfig.c:574 msgid "real name to use on IRC server" msgstr "" -#: src/common/weeconfig.c:569 src/common/weeconfig.c:570 +#: src/common/weeconfig.c:577 src/common/weeconfig.c:578 msgid "first command to run when connected to server" msgstr "" -#: src/common/weeconfig.c:573 +#: src/common/weeconfig.c:581 msgid "delay (in seconds) after command was executed" msgstr "" -#: src/common/weeconfig.c:574 +#: src/common/weeconfig.c:582 msgid "" "delay (in seconds) after command was executed (example: give some time for " "authentication)" msgstr "" -#: src/common/weeconfig.c:577 +#: src/common/weeconfig.c:585 msgid "list of channels to join when connected to server" msgstr "" -#: src/common/weeconfig.c:578 +#: src/common/weeconfig.c:586 msgid "comma separated list of channels to join when connected to server" msgstr "" -#: src/common/weeconfig.c:581 src/common/weeconfig.c:582 +#: src/common/weeconfig.c:589 src/common/weeconfig.c:590 msgid "automatically rejoin channels when kicked" msgstr "" -#: src/common/weeconfig.c:804 +#: src/common/weeconfig.c:812 #, c-format msgid "%s %s, line %d: new server, but previous was incomplete\n" msgstr "" -#: src/common/weeconfig.c:813 +#: src/common/weeconfig.c:821 #, c-format msgid "%s %s, line %d: server '%s' already exists\n" msgstr "" -#: src/common/weeconfig.c:826 +#: src/common/weeconfig.c:835 #, c-format msgid "%s %s, line %d: unable to create server\n" msgstr "" -#: src/common/weeconfig.c:865 +#: src/common/weeconfig.c:874 #, c-format msgid "%s unable to assign default int with string (\"%s\")\n" msgstr "" -#: src/common/weeconfig.c:876 +#: src/common/weeconfig.c:885 #, c-format msgid "%s unable to assign default color (\"%s\")\n" msgstr "" -#: src/common/weeconfig.c:915 +#: src/common/weeconfig.c:924 #, c-format msgid "%s config file \"%s\" not found.\n" msgstr "" -#: src/common/weeconfig.c:947 +#: src/common/weeconfig.c:956 #, c-format msgid "%s %s, line %d: invalid syntax, missing \"]\"\n" msgstr "" -#: src/common/weeconfig.c:964 +#: src/common/weeconfig.c:973 #, c-format msgid "%s %s, line %d: unknown section identifier (\"%s\")\n" msgstr "" -#: src/common/weeconfig.c:982 +#: src/common/weeconfig.c:991 #, c-format msgid "%s %s, line %d: invalid syntax, missing \"=\"\n" msgstr "" -#: src/common/weeconfig.c:1016 +#: src/common/weeconfig.c:1025 #, c-format msgid "%s %s, line %d: invalid option \"%s\"\n" msgstr "" -#: src/common/weeconfig.c:1027 +#: src/common/weeconfig.c:1036 #, c-format msgid "" "%s %s, line %d: invalid value foroption '%s'\n" "Expected: boolean value: 'off' or 'on'\n" msgstr "" -#: src/common/weeconfig.c:1036 +#: src/common/weeconfig.c:1045 #, c-format msgid "" "%s %s, line %d: invalid value for option '%s'\n" "Expected: integer between %d and %d\n" msgstr "" -#: src/common/weeconfig.c:1047 +#: src/common/weeconfig.c:1056 #, c-format msgid "" "%s %s, line %d: invalid value for option '%s'\n" "Expected: one of these strings: " msgstr "" -#: src/common/weeconfig.c:1063 +#: src/common/weeconfig.c:1072 #, c-format msgid "%s %s, line %d: invalid color name for option '%s'\n" msgstr "" -#: src/common/weeconfig.c:1122 src/common/weeconfig.c:1291 +#: src/common/weeconfig.c:1131 src/common/weeconfig.c:1300 #, c-format msgid "%s cannot create file \"%s\"\n" msgstr "" -#: src/common/weeconfig.c:1128 +#: src/common/weeconfig.c:1137 #, c-format msgid "%s: creating default config file...\n" msgstr "" -#: src/common/weeconfig.c:1129 +#: src/common/weeconfig.c:1138 msgid "creating default config file\n" msgstr "" -#: src/common/weeconfig.c:1132 src/common/weeconfig.c:1300 +#: src/common/weeconfig.c:1141 src/common/weeconfig.c:1309 #, c-format msgid "" "#\n" "# %s configuration file, created by %s v%s on %s#\n" msgstr "" -#: src/common/weeconfig.c:1297 +#: src/common/weeconfig.c:1306 msgid "saving config to disk\n" msgstr "" diff --git a/src/common/command.c b/src/common/command.c index 1c2af058c..6a5a1a663 100644 --- a/src/common/command.c +++ b/src/common/command.c @@ -1026,7 +1026,6 @@ int weechat_cmd_connect (int argc, char **argv) { t_irc_server *ptr_server; - t_irc_channel *ptr_channel; /* make gcc happy */ (void) argc; @@ -1048,13 +1047,9 @@ weechat_cmd_connect (int argc, char **argv) } if (server_connect (ptr_server)) { + ptr_server->reconnect_start = 0; + ptr_server->reconnect_join = (ptr_server->channels) ? 1 : 0; irc_login (ptr_server); - for (ptr_channel = ptr_server->channels; ptr_channel; - ptr_channel = ptr_channel->next_channel) - { - if (ptr_channel->type == CHAT_CHANNEL) - server_sendf (ptr_server, "JOIN %s\r\n", ptr_channel->name); - } } } else @@ -1082,14 +1077,17 @@ weechat_cmd_disconnect (int argc, char **argv) ptr_server = server_search (argv[0]); if (ptr_server) { - if (!ptr_server->is_connected) + if ((!ptr_server->is_connected) && (ptr_server->reconnect_start == 0)) { - gui_printf (NULL, + gui_printf (ptr_server->buffer, _("%s not connected to server \"%s\"!\n"), WEECHAT_ERROR, argv[0]); return -1; } - server_disconnect (ptr_server); + if (ptr_server->reconnect_start > 0) + gui_printf (ptr_server->buffer, + _("Auto-reconnection is cancelled\n")); + server_disconnect (ptr_server, 0); gui_draw_buffer_status (gui_current_window->buffer, 1); } else @@ -1603,8 +1601,10 @@ weechat_cmd_server (int argc, char **argv) } /* create new server */ - new_server = server_new (server.name, server.autoconnect, 0, - server.address, server.port, server.password, + new_server = server_new (server.name, server.autoconnect, + server.autoreconnect, + server.autoreconnect_delay, + 0, server.address, server.port, server.password, server.nick1, server.nick2, server.nick3, server.username, server.realname, server.command, 1, server.autojoin, 1); diff --git a/src/common/weechat.c b/src/common/weechat.c index c22d8201e..6d424a17a 100644 --- a/src/common/weechat.c +++ b/src/common/weechat.c @@ -228,8 +228,10 @@ wee_parse_args (int argc, char *argv[]) } else { - if (!server_new (server_tmp.name, 0, 1, - server_tmp.address, server_tmp.port, + if (!server_new (server_tmp.name, server_tmp.autoconnect, + server_tmp.autoreconnect, + server_tmp.autoreconnect_delay, + 1, server_tmp.address, server_tmp.port, server_tmp.password, server_tmp.nick1, server_tmp.nick2, server_tmp.nick3, NULL, NULL, NULL, 0, server_tmp.autojoin, 1)) diff --git a/src/common/weeconfig.c b/src/common/weeconfig.c index 7569b7079..e3c0ca190 100644 --- a/src/common/weeconfig.c +++ b/src/common/weeconfig.c @@ -534,6 +534,14 @@ t_config_option weechat_options_server[] = N_("automatically connect to server when WeeChat is starting"), OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE, NULL, NULL, &(cfg_server.autoconnect), NULL, NULL }, + { "server_autoreconnect", N_("automatically reconnect to server"), + N_("automatically reconnect to server when disconnected"), + OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE, + NULL, NULL, &(cfg_server.autoreconnect), NULL, NULL }, + { "server_autoreconnect_delay", N_("delay before trying again to reconnect"), + N_("delay (in deconds) before trying again to reconnect to server"), + OPTION_TYPE_INT, 0, 65535, 30, + NULL, NULL, &(cfg_server.autoreconnect_delay), NULL, NULL }, { "server_address", N_("server address or hostname"), N_("IP address or hostname of IRC server"), OPTION_TYPE_STRING, 0, 0, 0, @@ -815,7 +823,8 @@ config_allocate_server (char *filename, int line_number) return 0; } if (!server_new (cfg_server.name, - cfg_server.autoconnect, 0, cfg_server.address, cfg_server.port, + cfg_server.autoconnect, cfg_server.autoreconnect, + cfg_server.autoreconnect_delay, 0, cfg_server.address, cfg_server.port, cfg_server.password, cfg_server.nick1, cfg_server.nick2, cfg_server.nick3, cfg_server.username, cfg_server.realname, cfg_server.command, cfg_server.command_delay, cfg_server.autojoin, @@ -1374,6 +1383,10 @@ config_write (char *config_name) fprintf (file, "server_name=%s\n", ptr_server->name); fprintf (file, "server_autoconnect=%s\n", (ptr_server->autoconnect) ? "on" : "off"); + fprintf (file, "server_autoreconnect=%s\n", + (ptr_server->autoreconnect) ? "on" : "off"); + fprintf (file, "server_autoreconnect_delay=%d\n", + ptr_server->autoreconnect_delay); fprintf (file, "server_address=%s\n", ptr_server->address); fprintf (file, "server_port=%d\n", ptr_server->port); fprintf (file, "server_password=%s\n", diff --git a/src/gui/curses/gui-input.c b/src/gui/curses/gui-input.c index dfa245b6d..6c805742b 100644 --- a/src/gui/curses/gui-input.c +++ b/src/gui/curses/gui-input.c @@ -627,8 +627,14 @@ gui_main_loop () for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server) { - if (ptr_server->sock4 >= 0) - FD_SET (ptr_server->sock4, &read_fd); + /* check if reconnection is pending */ + if ((!ptr_server->is_connected) + && (ptr_server->reconnect_start > 0) + && (new_time >= (ptr_server->reconnect_start + ptr_server->autoreconnect_delay))) + server_reconnect (ptr_server); + else + if (ptr_server->sock4 >= 0) + FD_SET (ptr_server->sock4, &read_fd); } if (select (FD_SETSIZE, &read_fd, NULL, NULL, &timeout)) { diff --git a/src/irc/irc-recv.c b/src/irc/irc-recv.c index fb36faac4..29fb649da 100644 --- a/src/irc/irc-recv.c +++ b/src/irc/irc-recv.c @@ -99,7 +99,7 @@ irc_cmd_recv_error (t_irc_server *server, char *host, char *arguments) if (strncmp (arguments, "Closing Link", 12) == 0) { - server_disconnect (server); + server_disconnect (server, 1); return 0; } @@ -1500,6 +1500,7 @@ int irc_cmd_recv_004 (t_irc_server *server, char *host, char *arguments) { char *pos; + t_irc_channel *ptr_channel; /* make gcc happy */ (void) host; @@ -1528,9 +1529,23 @@ irc_cmd_recv_004 (t_irc_server *server, char *host, char *arguments) sleep (server->command_delay); } - /* autojoin */ - if (server->autojoin && server->autojoin[0]) - return irc_cmd_send_join (server, server->autojoin); + /* auto-join after disconnection (only rejoins opened channels) */ + if (server->reconnect_join) + { + for (ptr_channel = server->channels; ptr_channel; + ptr_channel = ptr_channel->next_channel) + { + if (ptr_channel->type == CHAT_CHANNEL) + server_sendf (server, "JOIN %s\r\n", ptr_channel->name); + } + server->reconnect_join = 0; + } + else + { + /* auto-join when connecting to server for first time */ + if (server->autojoin && server->autojoin[0]) + return irc_cmd_send_join (server, server->autojoin); + } return 0; } @@ -2919,12 +2934,24 @@ irc_cmd_recv_433 (t_irc_server *server, char *host, char *arguments) } else { - gui_printf (server->buffer, - _("%s: all declared nicknames are already in use, " - "closing connection with server!\n"), - PACKAGE_NAME); - server_disconnect (server); - return 0; + if (strcmp (server->nick, server->nick3) == 0) + { + gui_printf (server->buffer, + _("%s: all declared nicknames are already in use, " + "closing connection with server!\n"), + PACKAGE_NAME); + server_disconnect (server, 1); + return 0; + } + else + { + gui_printf (server->buffer, + _("%s: nickname \"%s\" is already in use, " + "trying 1st nickname \"%s\"\n"), + PACKAGE_NAME, server->nick, server->nick1); + free (server->nick); + server->nick = strdup (server->nick1); + } } } diff --git a/src/irc/irc-server.c b/src/irc/irc-server.c index 7ca269351..e054e32b1 100644 --- a/src/irc/irc-server.c +++ b/src/irc/irc-server.c @@ -59,7 +59,9 @@ void server_init (t_irc_server *server) { server->name = NULL; - server->autoconnect = 0; + server->autoconnect = 1; + server->autoreconnect = 1; + server->autoreconnect_delay = 30; server->command_line = 0; server->address = NULL; server->port = -1; @@ -74,6 +76,8 @@ server_init (t_irc_server *server) server->autojoin = NULL; server->nick = NULL; server->is_connected = 0; + server->reconnect_start = 0; + server->reconnect_join = 0; server->sock4 = -1; server->is_away = 0; server->server_read = -1; @@ -291,10 +295,11 @@ server_free_all () */ t_irc_server * -server_new (char *name, int autoconnect, int command_line, char *address, - int port, char *password, char *nick1, char *nick2, char *nick3, - char *username, char *realname, char *command, int command_delay, - char *autojoin, int autorejoin) +server_new (char *name, int autoconnect, int autoreconnect, int autoreconnect_delay, + int command_line, char *address, int port, char *password, + char *nick1, char *nick2, char *nick3, char *username, + char *realname, char *command, int command_delay, char *autojoin, + int autorejoin) { t_irc_server *new_server; @@ -316,6 +321,8 @@ server_new (char *name, int autoconnect, int command_line, char *address, { new_server->name = strdup (name); new_server->autoconnect = autoconnect; + new_server->autoreconnect = autoreconnect; + new_server->autoreconnect_delay = autoreconnect_delay; new_server->command_line = command_line; new_server->address = strdup (address); new_server->port = port; @@ -591,8 +598,9 @@ server_recv (t_irc_server *server) else { gui_printf (server->buffer, - _("%s cannot read data from socket, disconnecting from server...\n")); - server_disconnect (server); + _("%s cannot read data from socket, disconnecting from server...\n"), + WEECHAT_ERROR); + server_disconnect (server, 1); } } @@ -701,6 +709,29 @@ server_connect (t_irc_server *server) } /* + * server_reconnect: reconnect to a server (after disconnection) + */ + +void +server_reconnect (t_irc_server *server) +{ + gui_printf (server->buffer, _("Reconnecting to server...\n")); + server->reconnect_start = 0; + + if (server_connect (server)) + { + server->reconnect_join = 1; + irc_login (server); + } + else + { + server->reconnect_start = time (NULL); + gui_printf (server->buffer, _("Reconnecting to server in %d seconds\n"), + server->autoreconnect_delay); + } +} + +/* * server_auto_connect: auto-connect to servers (called at startup) */ @@ -727,7 +758,7 @@ server_auto_connect (int command_line) */ void -server_disconnect (t_irc_server *server) +server_disconnect (t_irc_server *server, int reconnect) { t_irc_channel *ptr_channel; @@ -737,17 +768,38 @@ server_disconnect (t_irc_server *server) for (ptr_channel = server->channels; ptr_channel; ptr_channel = ptr_channel->next_channel) { + nick_free_all (ptr_channel); irc_display_prefix (ptr_channel->buffer, PREFIX_INFO); gui_printf (ptr_channel->buffer, _("Disconnected from server!\n")); } - - /* close communication with server */ + gui_draw_buffer_nick (gui_current_window->buffer, 1); + gui_draw_buffer_status (gui_current_window->buffer, 1); + } + + /* close communication with server */ + if (server->server_read >= 0) close (server->server_read); + server->server_read = -1; + + if (server->server_write >= 0) close (server->server_write); + server->server_write = -1; + + + if (server->sock4 >= 0) close (server->sock4); - server->is_connected = 0; - server->sock4 = -1; + server->sock4 = -1; + + server->is_connected = 0; + + if ((reconnect) && (server->autoreconnect)) + { + server->reconnect_start = time (NULL); + gui_printf (server->buffer, _("Reconnecting to server in %d seconds\n"), + server->autoreconnect_delay); } + else + server->reconnect_start = 0; } /* @@ -760,7 +812,7 @@ server_disconnect_all () t_irc_server *ptr_server; for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server) - server_disconnect (ptr_server); + server_disconnect (ptr_server, 0); } /* diff --git a/src/irc/irc.h b/src/irc/irc.h index dbbcce649..b2a4fb6b5 100644 --- a/src/irc/irc.h +++ b/src/irc/irc.h @@ -116,6 +116,8 @@ struct t_irc_server /* user choices */ char *name; /* name of server (only for display) */ int autoconnect; /* = 1 if auto connect at startup */ + int autoreconnect; /* = 1 if auto reco when disconnected */ + int autoreconnect_delay; /* delay before trying again reconnect */ int command_line; /* server was given on command line */ char *address; /* address of server (IP or name) */ int port; /* port for server (6667 by default) */ @@ -133,6 +135,8 @@ struct t_irc_server /* internal vars */ char *nick; /* current nickname */ int is_connected; /* 1 if WeeChat is connected to server */ + time_t reconnect_start; /* this time + delay = reconnect time */ + int reconnect_join; /* 1 if channels opened to rejoin */ int sock4; /* socket for server */ int is_away; /* 1 is user is marker as away */ time_t away_time; /* time() when user marking as away */ @@ -214,15 +218,16 @@ extern t_irc_server *server_alloc (); extern void server_destroy (t_irc_server *); extern void server_free (t_irc_server *); extern void server_free_all (); -extern t_irc_server *server_new (char *, int, int, char *, int, char *, char *, - char *, char *, char *, char *, char *, int, - char *, int); +extern t_irc_server *server_new (char *, int, int, int, int, char *, int, char *, + char *, char *, char *, char *, char *, char *, + int, char *, int); extern int server_send (t_irc_server *, char *, int); extern void server_sendf (t_irc_server *, char *, ...); extern void server_recv (t_irc_server *); -extern int server_connect (); +extern int server_connect (t_irc_server *); +extern void server_reconnect (t_irc_server *); extern void server_auto_connect (int); -extern void server_disconnect (t_irc_server *); +extern void server_disconnect (t_irc_server *, int); extern void server_disconnect_all (); extern t_irc_server *server_search (char *); extern int server_get_number_connected (); diff --git a/weechat/ChangeLog b/weechat/ChangeLog index 93b0450c2..13e55c4af 100644 --- a/weechat/ChangeLog +++ b/weechat/ChangeLog @@ -5,7 +5,11 @@ ChangeLog - 2004-12-27 Version 0.0.9 (under dev!): - * major bug fixed when socket is closed by server (100% CPU usage fixed) + * auto-reconnection to server (new options: server_autoreconnect (on/off), + server_autoreconnect_delay (in seconds)) + * major bug fixed when socket is closed by server (100% CPU usage fixed), + and disconnections are now ok (all channels are "closed", history is still + visible, and buffer will be used again if reconnection to server) * option "look_remove_colors_from_msgs" is now working * fixed display of nick mode changes * /notice command fixed (and display when received from server) diff --git a/weechat/po/fr.po b/weechat/po/fr.po index 431bcad79..cc962de54 100644 --- a/weechat/po/fr.po +++ b/weechat/po/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.0.9-pre1\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2004-12-27 13:52+0100\n" +"POT-Creation-Date: 2004-12-27 17:09+0100\n" "PO-Revision-Date: 2004-12-21 20:51+0100\n" "Last-Translator: FlashCode <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -20,96 +20,105 @@ msgstr "" msgid "%s cannot allocate new nick\n" msgstr "%s ompossible d'allouer un nouveau pseudo\n" -#: src/irc/irc-server.c:130 src/common/weeconfig.c:1241 +#: src/irc/irc-server.c:134 src/common/weeconfig.c:1250 msgid "Unable to get user's name" msgstr "Impossible de déterminer le nom d'utilisateur" -#: src/irc/irc-server.c:195 +#: src/irc/irc-server.c:199 #, c-format msgid "%s cannot allocate new server\n" msgstr "%s impossible d'allouer un nouveau serveur\n" -#: src/irc/irc-server.c:386 +#: src/irc/irc-server.c:393 #, c-format msgid "%s error sending data to IRC server\n" msgstr "%s erreur d'envoi de données au serveur IRC\n" -#: src/irc/irc-server.c:403 src/irc/irc-server.c:414 src/irc/irc-server.c:468 +#: src/irc/irc-server.c:410 src/irc/irc-server.c:421 src/irc/irc-server.c:475 #, c-format msgid "%s not enough memory for received IRC message\n" msgstr "%s mémoire insuffisante pour un message IRC reçu\n" -#: src/irc/irc-server.c:475 +#: src/irc/irc-server.c:482 #, c-format msgid "%s unable to explode received buffer\n" msgstr "%s impossible d'exploser le tampon de réception\n" -#: src/irc/irc-server.c:548 +#: src/irc/irc-server.c:555 #, c-format msgid "Command '%s' failed!\n" msgstr "La commande '%s' a échoué !\n" -#: src/irc/irc-server.c:552 +#: src/irc/irc-server.c:559 msgid "No command to execute!\n" msgstr "Pas de commande à exécuter !\n" -#: src/irc/irc-server.c:556 +#: src/irc/irc-server.c:563 #, c-format msgid "Unknown command: cmd=%s, args=%s\n" msgstr "Commande inconnue: cmd=%s, params=%s\n" -#: src/irc/irc-server.c:594 +#: src/irc/irc-server.c:601 #, c-format msgid "%s cannot read data from socket, disconnecting from server...\n" msgstr "" "%s impossible de lire des données sur la socket, déconnexion du serveur...\n" -#: src/irc/irc-server.c:614 +#: src/irc/irc-server.c:622 #, c-format msgid "%s: connecting to %s:%d...\n" msgstr "%s: connexion à %s:%d...\n" -#: src/irc/irc-server.c:616 +#: src/irc/irc-server.c:624 #, c-format msgid "connecting to server %s:%d...\n" msgstr "connexion au serveur %s:%d...\n" -#: src/irc/irc-server.c:624 +#: src/irc/irc-server.c:632 #, c-format msgid "%s cannot create pipe\n" msgstr "%s impossible de créer le pipe\n" -#: src/irc/irc-server.c:638 +#: src/irc/irc-server.c:646 #, c-format msgid "%s cannot set socket option \"SO_REUSEADDR\"\n" msgstr "%s impossible de paramétrer l'option socket \"SO_REUSEADDR\"\n" -#: src/irc/irc-server.c:645 +#: src/irc/irc-server.c:653 #, c-format msgid "%s cannot set socket option \"SO_KEEPALIVE\"\n" msgstr "%s impossible de paramétrer l'option socket \"SO_KEEPALIVE\"\n" -#: src/irc/irc-server.c:653 +#: src/irc/irc-server.c:661 #, c-format msgid "%s address \"%s\" not found\n" msgstr "%s adresse \"%s\" introuvable\n" -#: src/irc/irc-server.c:676 +#: src/irc/irc-server.c:684 #, c-format msgid "%s IP address not found\n" msgstr "%s adresse IP introuvable\n" -#: src/irc/irc-server.c:686 +#: src/irc/irc-server.c:694 #, c-format msgid "%s: server IP is: %s\n" msgstr "%s: l'adresse IP du serveur est : %s\n" -#: src/irc/irc-server.c:692 +#: src/irc/irc-server.c:700 #, c-format msgid "%s cannot connect to irc server\n" msgstr "%s connexion au serveur irc impossible\n" -#: src/irc/irc-server.c:741 +#: src/irc/irc-server.c:718 +msgid "Reconnecting to server...\n" +msgstr "Reconnexion au serveur...\n" + +#: src/irc/irc-server.c:729 src/irc/irc-server.c:798 +#, c-format +msgid "Reconnecting to server in %d seconds\n" +msgstr "Reconnexion au serveur dans %d secondes\n" + +#: src/irc/irc-server.c:773 msgid "Disconnected from server!\n" msgstr "Déconnecté du serveur !\n" @@ -1143,7 +1152,7 @@ msgstr "drapeau de mode inconnu" msgid "can't change mode for other users" msgstr "impossible de changer le mode pour les autres utilisateurs" -#: src/irc/irc-send.c:58 src/irc/irc-recv.c:2934 +#: src/irc/irc-send.c:58 src/irc/irc-recv.c:2961 msgid "unknown" msgstr "inconnu" @@ -1178,7 +1187,7 @@ msgstr "%s utilisateur non trouvé pour la commande \"%s\"\n" msgid "%s cannot create new private window \"%s\"\n" msgstr "%s impossible de créer la fenêtre privée \"%s\"\n" -#: src/irc/irc-send.c:670 src/irc/irc-send.c:741 src/common/command.c:1304 +#: src/irc/irc-send.c:670 src/irc/irc-send.c:741 src/common/command.c:1302 #, c-format msgid "%s wrong argument count for \"%s\" command\n" msgstr "%s nombre de paramètres erroné pour la commande \"%s\"\n" @@ -1198,7 +1207,7 @@ msgid " has joined " msgstr " a rejoint " #: src/irc/irc-recv.c:229 src/irc/irc-recv.c:593 src/irc/irc-recv.c:899 -#: src/irc/irc-recv.c:1039 src/irc/irc-recv.c:2434 src/irc/irc-recv.c:2499 +#: src/irc/irc-recv.c:1039 src/irc/irc-recv.c:2449 src/irc/irc-recv.c:2514 #, c-format msgid "%s channel not found for \"%s\" command\n" msgstr "%s canal non trouvé pour la commande \"%s\"\n" @@ -1372,8 +1381,8 @@ msgid "from" msgstr "de" #: src/irc/irc-recv.c:1123 src/irc/irc-recv.c:1137 src/irc/irc-recv.c:1152 -#: src/irc/irc-recv.c:1167 src/irc/irc-recv.c:1261 src/irc/irc-recv.c:2720 -#: src/irc/irc-recv.c:2760 +#: src/irc/irc-recv.c:1167 src/irc/irc-recv.c:1261 src/irc/irc-recv.c:2735 +#: src/irc/irc-recv.c:2775 #, c-format msgid "%s cannot parse \"%s\" command\n" msgstr "%s impossible d'analyser la commande \"%s\"\n" @@ -1405,160 +1414,160 @@ msgstr " en: \"%s\"\n" msgid " has unset topic for " msgstr " a retiré le titre pour " -#: src/irc/irc-recv.c:1570 +#: src/irc/irc-recv.c:1585 #, c-format msgid " is away: %s\n" msgstr " est absent: %s\n" -#: src/irc/irc-recv.c:1644 +#: src/irc/irc-recv.c:1659 msgid "Users online: " msgstr "Utilisateurs en ligne: " -#: src/irc/irc-recv.c:2007 +#: src/irc/irc-recv.c:2022 msgid "idle: " msgstr "inactivité: " -#: src/irc/irc-recv.c:2015 +#: src/irc/irc-recv.c:2030 msgid "days" msgstr "jours" -#: src/irc/irc-recv.c:2015 +#: src/irc/irc-recv.c:2030 msgid "day" msgstr "jour" -#: src/irc/irc-recv.c:2025 +#: src/irc/irc-recv.c:2040 msgid "hours" msgstr "heures" -#: src/irc/irc-recv.c:2025 +#: src/irc/irc-recv.c:2040 msgid "hour" msgstr "heure" -#: src/irc/irc-recv.c:2031 +#: src/irc/irc-recv.c:2046 msgid "minutes" msgstr "minutes" -#: src/irc/irc-recv.c:2031 +#: src/irc/irc-recv.c:2046 msgid "minute" msgstr "minute" -#: src/irc/irc-recv.c:2037 +#: src/irc/irc-recv.c:2052 msgid "seconds" msgstr "secondes" -#: src/irc/irc-recv.c:2037 +#: src/irc/irc-recv.c:2052 msgid "second" msgstr "seconde" -#: src/irc/irc-recv.c:2042 +#: src/irc/irc-recv.c:2057 msgid "signon at: " msgstr "signé le: " -#: src/irc/irc-recv.c:2130 +#: src/irc/irc-recv.c:2145 msgid "Channels: " msgstr "Canaux: " -#: src/irc/irc-recv.c:2381 +#: src/irc/irc-recv.c:2396 msgid "No topic set for " msgstr "Pas de titre défini pour " -#: src/irc/irc-recv.c:2423 +#: src/irc/irc-recv.c:2438 msgid "Topic for " msgstr "Le titre pour " -#: src/irc/irc-recv.c:2427 +#: src/irc/irc-recv.c:2442 #, c-format msgid " is: \"%s\"\n" msgstr " est: \"%s\"\n" -#: src/irc/irc-recv.c:2443 src/irc/irc-recv.c:2523 +#: src/irc/irc-recv.c:2458 src/irc/irc-recv.c:2538 #, c-format msgid "%s cannot identify channel for \"%s\" command\n" msgstr "%s impossible de déterminer le canal pour la commande \"%s\"\n" -#: src/irc/irc-recv.c:2489 +#: src/irc/irc-recv.c:2504 msgid "Topic set by " msgstr "Titre défini par " -#: src/irc/irc-recv.c:2507 +#: src/irc/irc-recv.c:2522 #, c-format msgid "%s cannot identify date/time for \"%s\" command\n" msgstr "%s impossible d'identifier la date/heure pour la commande \"%s\"\n" -#: src/irc/irc-recv.c:2515 +#: src/irc/irc-recv.c:2530 #, c-format msgid "%s cannot identify nickname for \"%s\" command\n" msgstr "" "%s impossible de déterminer le nom d'utilisateur pour la commande \"%s\"\n" -#: src/irc/irc-recv.c:2644 +#: src/irc/irc-recv.c:2659 msgid " on " msgstr " sur " -#: src/irc/irc-recv.c:2751 +#: src/irc/irc-recv.c:2766 #, c-format msgid "%s cannot create nick \"%s\" for channel \"%s\"\n" msgstr "%s impossible de créer l'utilisateur \"%s\" pour le canal \"%s\"\n" -#: src/irc/irc-recv.c:2804 +#: src/irc/irc-recv.c:2819 msgid "Nicks " msgstr "Utilisateurs " -#: src/irc/irc-recv.c:2824 +#: src/irc/irc-recv.c:2839 msgid "Channel " msgstr "Canal " -#: src/irc/irc-recv.c:2835 +#: src/irc/irc-recv.c:2850 msgid "nicks" msgstr "utilisateurs" -#: src/irc/irc-recv.c:2835 +#: src/irc/irc-recv.c:2850 msgid "nick" msgstr "utilisateur" -#: src/irc/irc-recv.c:2843 +#: src/irc/irc-recv.c:2858 msgid "ops" msgstr "ops" -#: src/irc/irc-recv.c:2843 +#: src/irc/irc-recv.c:2858 msgid "op" msgstr "op" -#: src/irc/irc-recv.c:2852 +#: src/irc/irc-recv.c:2867 msgid "halfops" msgstr "halfops" -#: src/irc/irc-recv.c:2852 +#: src/irc/irc-recv.c:2867 msgid "halfop" msgstr "halfop" -#: src/irc/irc-recv.c:2861 +#: src/irc/irc-recv.c:2876 msgid "voices" msgstr "voices" -#: src/irc/irc-recv.c:2861 +#: src/irc/irc-recv.c:2876 msgid "voice" msgstr "voice" -#: src/irc/irc-recv.c:2870 +#: src/irc/irc-recv.c:2885 msgid "normal" msgstr "normal" -#: src/irc/irc-recv.c:2903 +#: src/irc/irc-recv.c:2918 #, c-format msgid "%s: nickname \"%s\" is already in use, trying 2nd nickname \"%s\"\n" msgstr "" "%s: l'utilisateur \"%s\" est déjà en cours d'utilisation, essai avec le 2nd " "nom d'utilisateur \"%s\"\n" -#: src/irc/irc-recv.c:2914 +#: src/irc/irc-recv.c:2929 #, c-format msgid "%s: nickname \"%s\" is already in use, trying 3rd nickname \"%s\"\n" msgstr "" "%s: l'utilisateur \"%s\" est déjà en cours d'utilisation, essai du 3ème nom " "d'utilisateur \"%s\"\n" -#: src/irc/irc-recv.c:2923 +#: src/irc/irc-recv.c:2940 #, c-format msgid "" "%s: all declared nicknames are already in use, closing connection with " @@ -1567,6 +1576,13 @@ msgstr "" "%s: tous les noms d'utilisateurs déclarés sont déjà en cours d'utilisation, " "fermeture de la connexion avec le serveur !\n" +#: src/irc/irc-recv.c:2949 +#, c-format +msgid "%s: nickname \"%s\" is already in use, trying 1st nickname \"%s\"\n" +msgstr "" +"%s: l'utilisateur \"%s\" est déjà en cours d'utilisation, essai avec le 1er " +"nom d'utilisateur \"%s\"\n" + #: src/irc/irc-dcc.c:44 msgid "Waiting" msgstr "Attente" @@ -2065,7 +2081,7 @@ msgstr "Aucun alias défini.\n" msgid "Opened buffers:\n" msgstr "Tampons ouverts:\n" -#: src/common/command.c:858 src/common/command.c:1353 +#: src/common/command.c:858 src/common/command.c:1351 msgid "Server: " msgstr "Serveur: " @@ -2105,87 +2121,91 @@ msgstr "%s buffer \"%s\" non trouvé pour la commande \"%s\"\n" msgid "unknown parameter \"%s\" for \"%s\" command\n" msgstr "paramètre inconnu \"%s\" pour la commande \"%s\"\n" -#: src/common/command.c:1040 +#: src/common/command.c:1039 #, c-format msgid "%s already connected to server \"%s\"!\n" msgstr "%s déjà connecté au serveur \"%s\" !\n" -#: src/common/command.c:1063 src/common/command.c:1098 +#: src/common/command.c:1058 src/common/command.c:1096 #, c-format msgid "%s server \"%s\" not found\n" msgstr "%s serveur \"%s\" non trouvé\n" -#: src/common/command.c:1088 +#: src/common/command.c:1083 #, c-format msgid "%s not connected to server \"%s\"!\n" msgstr "%s non connecté au serveur \"%s\" !\n" -#: src/common/command.c:1117 +#: src/common/command.c:1089 +msgid "Auto-reconnection is cancelled\n" +msgstr "La reconnexion automatique est annulée\n" + +#: src/common/command.c:1115 #, c-format msgid "> List of %s internal commands:\n" msgstr "> Liste des commandes internes %s:\n" -#: src/common/command.c:1122 +#: src/common/command.c:1120 msgid "> List of IRC commands:\n" msgstr "> Liste des commandes IRC:\n" -#: src/common/command.c:1137 +#: src/common/command.c:1135 #, c-format msgid "> Help on %s internal command \"%s\":\n" msgstr "> Aide sur la commande interne %s \"%s\":\n" -#: src/common/command.c:1140 src/common/command.c:1161 +#: src/common/command.c:1138 src/common/command.c:1159 #, c-format msgid "Syntax: /%s %s\n" msgstr "Syntaxe: /%s %s\n" -#: src/common/command.c:1159 +#: src/common/command.c:1157 #, c-format msgid "> Help on IRC command \"%s\":\n" msgstr "> Aide sur la commande IRC \"%s\":\n" -#: src/common/command.c:1175 +#: src/common/command.c:1173 #, c-format msgid "No help available, \"%s\" is an unknown command\n" msgstr "Pas d'aide disponible, la commande \"%s\" est inconnue\n" -#: src/common/command.c:1200 +#: src/common/command.c:1198 msgid "Registered Perl scripts:\n" msgstr "Scripts Perl enregistrés :\n" -#: src/common/command.c:1217 src/common/command.c:1239 -#: src/common/command.c:1261 +#: src/common/command.c:1215 src/common/command.c:1237 +#: src/common/command.c:1259 msgid " (none)\n" msgstr " (aucun)\n" -#: src/common/command.c:1222 +#: src/common/command.c:1220 msgid "Perl message handlers:\n" msgstr "Fonctions Perl pour messages :\n" -#: src/common/command.c:1231 +#: src/common/command.c:1229 #, c-format msgid " IRC(%s) => Perl(%s)\n" msgstr " IRC(%s) => Perl(%s)\n" -#: src/common/command.c:1244 +#: src/common/command.c:1242 msgid "Perl command handlers:\n" msgstr "Commandes Perl :\n" -#: src/common/command.c:1253 +#: src/common/command.c:1251 #, c-format msgid " Command /%s => Perl(%s)\n" msgstr " Commande /%s => Perl(%s)\n" -#: src/common/command.c:1273 +#: src/common/command.c:1271 msgid "Perl scripts unloaded\n" msgstr "Scripts Perl déchargés\n" -#: src/common/command.c:1298 src/common/command.c:1836 +#: src/common/command.c:1296 src/common/command.c:1836 #, c-format msgid "%s unknown option for \"%s\" command\n" msgstr "%s option inconnue pour la commande \"%s\"\n" -#: src/common/command.c:1309 +#: src/common/command.c:1307 msgid "" "WeeChat was build without Perl support.\n" "Please rebuild WeeChat with \"--enable-perl\" option for ./configure script\n" @@ -2194,131 +2214,131 @@ msgstr "" "Merci de reconstruire WeeChat avec l'option \"--enable-perl\" pour le " "script ./configure\n" -#: src/common/command.c:1364 +#: src/common/command.c:1362 msgid "connected" msgstr "connecté" -#: src/common/command.c:1364 +#: src/common/command.c:1362 msgid "not connected" msgstr "non connecté" -#: src/common/command.c:1371 +#: src/common/command.c:1369 #, c-format msgid " Autoconnect: %s%s\n" msgstr " Autoconnect: %s%s\n" -#: src/common/command.c:1372 +#: src/common/command.c:1370 msgid "yes" msgstr "oui" -#: src/common/command.c:1372 +#: src/common/command.c:1370 msgid "no" msgstr "non" -#: src/common/command.c:1374 +#: src/common/command.c:1372 msgid " (temporary server, will not be saved)" msgstr " (serveur temporaire, ne sera pas sauvé)" -#: src/common/command.c:1379 +#: src/common/command.c:1377 #, c-format msgid " Hostname : %s\n" msgstr " Nom/IP : %s\n" -#: src/common/command.c:1384 +#: src/common/command.c:1382 #, c-format msgid " Port : %d\n" msgstr " Port : %d\n" -#: src/common/command.c:1390 +#: src/common/command.c:1388 msgid " Password : (hidden)\n" msgstr " Mot passe : (caché)\n" -#: src/common/command.c:1394 +#: src/common/command.c:1392 msgid " Password : (none)\n" msgstr " Mot passe : (aucun)\n" -#: src/common/command.c:1398 +#: src/common/command.c:1396 #, c-format msgid " Nicks : %s" msgstr " Pseudos : %s" -#: src/common/command.c:1415 +#: src/common/command.c:1413 #, c-format msgid " Username : %s\n" msgstr " Nom utilis.: %s\n" -#: src/common/command.c:1420 +#: src/common/command.c:1418 #, c-format msgid " Realname : %s\n" msgstr " Nom réel : %s\n" -#: src/common/command.c:1426 +#: src/common/command.c:1424 #, c-format msgid " Command : %s\n" msgstr " Commande : %s\n" -#: src/common/command.c:1431 +#: src/common/command.c:1429 msgid " Command : (none)\n" msgstr " Commande : (aucune)\n" -#: src/common/command.c:1436 +#: src/common/command.c:1434 #, c-format msgid " Auto-join : %s\n" msgstr " Auto-join : %s\n" -#: src/common/command.c:1441 +#: src/common/command.c:1439 msgid " Auto-join : (none)\n" msgstr " Auto-join : (aucun)\n" -#: src/common/command.c:1445 +#: src/common/command.c:1443 msgid "No server.\n" msgstr "Pas de serveur.\n" -#: src/common/command.c:1454 +#: src/common/command.c:1452 #, c-format msgid "%s missing servername for \"%s\" command\n" msgstr "%s il manque le nom du serveur pour la commande \"%s\"\n" -#: src/common/command.c:1460 +#: src/common/command.c:1458 #, c-format msgid "%s too much arguments for \"%s\" command, ignoring arguments\n" msgstr "%s trop de paramètres pour la commande \"%s\", paramètres ignorés\n" -#: src/common/command.c:1477 +#: src/common/command.c:1475 #, c-format msgid "%s server \"%s\" not found for \"%s\" command\n" msgstr "%s le serveur \"%s\" n'existe pas pour la commande \"%s\"\n" -#: src/common/command.c:1483 src/common/command.c:1614 +#: src/common/command.c:1481 src/common/command.c:1614 msgid "Server" msgstr "Serveur" -#: src/common/command.c:1486 +#: src/common/command.c:1484 msgid "has been deleted\n" msgstr "a été supprimé\n" -#: src/common/command.c:1500 +#: src/common/command.c:1498 #, c-format msgid "%s missing parameters for \"%s\" command\n" msgstr "%s paramètres manquants pour la commande \"%s\"\n" -#: src/common/command.c:1509 +#: src/common/command.c:1507 #, c-format msgid "%s server \"%s\" already exists, can't create it!\n" msgstr "%s le serveur \"%s\" existe déjà, impossible de le créer !\n" -#: src/common/command.c:1533 src/common/command.c:1559 -#: src/common/command.c:1571 src/common/command.c:1595 +#: src/common/command.c:1531 src/common/command.c:1557 +#: src/common/command.c:1569 src/common/command.c:1593 #, c-format msgid "%s missing password for \"%s\" parameter\n" msgstr "%s mot de passe manquant pour le paramètre \"%s\"\n" -#: src/common/command.c:1545 +#: src/common/command.c:1543 #, c-format msgid "%s missing nick(s) for \"%s\" parameter\n" msgstr "%s pseudo(s) manquant(s) pour le paramètre \"%s\"\n" -#: src/common/command.c:1583 +#: src/common/command.c:1581 #, c-format msgid "%s missing command for \"%s\" parameter\n" msgstr "%s commande manquante pour le paramètre \"%s\"\n" @@ -2456,52 +2476,52 @@ msgstr "" msgid "%s invalid syntax for IRC server ('%s'), ignored\n" msgstr "%s syntaxe invalide pour le serveur IRC ('%s'), ignoré\n" -#: src/common/weechat.c:236 +#: src/common/weechat.c:238 #, c-format msgid "%s unable to create server ('%s'), ignored\n" msgstr "%s impossible de créer le serveur ('%s'), ignoré\n" -#: src/common/weechat.c:245 +#: src/common/weechat.c:247 #, c-format msgid "%s unknown parameter '%s', ignored\n" msgstr "%s paramètre inconnu '%s', ignoré\n" -#: src/common/weechat.c:265 +#: src/common/weechat.c:267 #, c-format msgid "%s cannot create directory \"%s\"\n" msgstr "%s impossible de créer le répertoire \"%s\"\n" -#: src/common/weechat.c:291 +#: src/common/weechat.c:293 #, c-format msgid "%s unable to get HOME directory\n" msgstr "%s impossible de lire le répertoire personnel\n" -#: src/common/weechat.c:300 +#: src/common/weechat.c:302 #, c-format msgid "%s not enough memory for home directory\n" msgstr "%s pas assez de mémoire pour le répertoire personnel\n" -#: src/common/weechat.c:310 +#: src/common/weechat.c:312 #, c-format msgid "%s unable to create ~/.weechat directory\n" msgstr "%s impossible de créer le répertoire ~/.weechat\n" -#: src/common/weechat.c:362 +#: src/common/weechat.c:364 #, c-format msgid "%s unable to create ~/.weechat/logs directory\n" msgstr "%s impossible de créer le répertoire ~/.weechat/logs\n" -#: src/common/weechat.c:397 +#: src/common/weechat.c:399 #, c-format msgid "%s unable to create/append to log file (~/.weechat/%s)" msgstr "%s impossible de créer/ajouter dans le fichier de log (~/.weechat/%s)" -#: src/common/weechat.c:420 +#: src/common/weechat.c:422 #, c-format msgid "%sWelcome to " msgstr "%sBienvenue dans " -#: src/common/weechat.c:433 +#: src/common/weechat.c:435 msgid "compiled on" msgstr "compilé le" @@ -3056,50 +3076,66 @@ msgid "automatically connect to server when WeeChat is starting" msgstr "connexion automatique au serveur quand WeeChat démarre" #: src/common/weeconfig.c:537 +msgid "automatically reconnect to server" +msgstr "reconnexion automatique au serveur" + +#: src/common/weeconfig.c:538 +msgid "automatically reconnect to server when disconnected" +msgstr "reconnexion automatique au serveur après une déconnexion" + +#: src/common/weeconfig.c:541 +msgid "delay before trying again to reconnect" +msgstr "délai avant de tenter une reconnexion" + +#: src/common/weeconfig.c:542 +msgid "delay (in deconds) before trying again to reconnect to server" +msgstr "délai (en secondes) avant de tenter une reconnexion au serveur" + +#: src/common/weeconfig.c:545 msgid "server address or hostname" msgstr "adresse ou nom du serveur" -#: src/common/weeconfig.c:538 +#: src/common/weeconfig.c:546 msgid "IP address or hostname of IRC server" msgstr "adresse IP ou nom du serveur IRC" -#: src/common/weeconfig.c:541 +#: src/common/weeconfig.c:549 msgid "port for IRC server" msgstr "port pour le serveur IRC" -#: src/common/weeconfig.c:542 +#: src/common/weeconfig.c:550 msgid "port for connecting to server" msgstr "port pour se connecter au serveur" -#: src/common/weeconfig.c:545 +#: src/common/weeconfig.c:553 msgid "server password" msgstr "mot de passe pour le serveur" -#: src/common/weeconfig.c:546 +#: src/common/weeconfig.c:554 msgid "password for IRC server" msgstr "mot de passe pour le serveur IRC" -#: src/common/weeconfig.c:549 +#: src/common/weeconfig.c:557 msgid "nickname for server" msgstr "pseudo pour le serveur" -#: src/common/weeconfig.c:550 +#: src/common/weeconfig.c:558 msgid "nickname to use on IRC server" msgstr "pseudo à utiliser sur le serveur IRC" -#: src/common/weeconfig.c:553 +#: src/common/weeconfig.c:561 msgid "alternate nickname for server" msgstr "pseudo alternatif pour le serveur" -#: src/common/weeconfig.c:554 +#: src/common/weeconfig.c:562 msgid "alternate nickname to use on IRC server (if nickname is already used)" msgstr "pseudo alternatif pour le serveur IRC (si le pseudo est déjà utilisé)" -#: src/common/weeconfig.c:557 +#: src/common/weeconfig.c:565 msgid "2nd alternate nickname for server" msgstr "2nd pseudo alternatif pour le serveur" -#: src/common/weeconfig.c:558 +#: src/common/weeconfig.c:566 msgid "" "2nd alternate nickname to use on IRC server (if alternate nickname is " "already used)" @@ -3107,31 +3143,31 @@ msgstr "" "2nd pseudo alternatif pour le serveur IRC (si le pseudo alternatif est déjà " "utilisé)" -#: src/common/weeconfig.c:561 +#: src/common/weeconfig.c:569 msgid "user name for server" msgstr "nom d'utilisateur pour le serveur" -#: src/common/weeconfig.c:562 +#: src/common/weeconfig.c:570 msgid "user name to use on IRC server" msgstr "nom d'utilisateur pour le serveur IRC" -#: src/common/weeconfig.c:565 +#: src/common/weeconfig.c:573 msgid "real name for server" msgstr "nom réel pour le serveur" -#: src/common/weeconfig.c:566 +#: src/common/weeconfig.c:574 msgid "real name to use on IRC server" msgstr "nom réel pour le serveur IRC" -#: src/common/weeconfig.c:569 src/common/weeconfig.c:570 +#: src/common/weeconfig.c:577 src/common/weeconfig.c:578 msgid "first command to run when connected to server" msgstr "commande à exécuter en premier lorsque connecté au serveur" -#: src/common/weeconfig.c:573 +#: src/common/weeconfig.c:581 msgid "delay (in seconds) after command was executed" msgstr "délai (en secondes) après exécution de la commande" -#: src/common/weeconfig.c:574 +#: src/common/weeconfig.c:582 msgid "" "delay (in seconds) after command was executed (example: give some time for " "authentication)" @@ -3139,71 +3175,71 @@ msgstr "" "délai (en secondes) après exécution de la commande (exemple: donner du temps " "pour l'authentification)" -#: src/common/weeconfig.c:577 +#: src/common/weeconfig.c:585 msgid "list of channels to join when connected to server" msgstr "liste des canaux à rejoindre lorsque connecté au serveur" -#: src/common/weeconfig.c:578 +#: src/common/weeconfig.c:586 msgid "comma separated list of channels to join when connected to server" msgstr "" "liste des canaux (séparés par des virgules) à rejoindre lorsque connecté au " "serveur" -#: src/common/weeconfig.c:581 src/common/weeconfig.c:582 +#: src/common/weeconfig.c:589 src/common/weeconfig.c:590 msgid "automatically rejoin channels when kicked" msgstr "rejoindre automatiquement les canaux quand mis dehors" -#: src/common/weeconfig.c:804 +#: src/common/weeconfig.c:812 #, c-format msgid "%s %s, line %d: new server, but previous was incomplete\n" msgstr "%s %s, ligne %d: nouveau serveur, mais le précédent était incomplet\n" -#: src/common/weeconfig.c:813 +#: src/common/weeconfig.c:821 #, c-format msgid "%s %s, line %d: server '%s' already exists\n" msgstr "%s %s, ligne %d: le serveur '%s' existe déjà\n" -#: src/common/weeconfig.c:826 +#: src/common/weeconfig.c:835 #, c-format msgid "%s %s, line %d: unable to create server\n" msgstr "%s %s, ligne %d: impossible de créer le serveur\n" -#: src/common/weeconfig.c:865 +#: src/common/weeconfig.c:874 #, c-format msgid "%s unable to assign default int with string (\"%s\")\n" msgstr "%s impossible d'assigner la valeur entière avec la chaîne (\"%s\")\n" -#: src/common/weeconfig.c:876 +#: src/common/weeconfig.c:885 #, c-format msgid "%s unable to assign default color (\"%s\")\n" msgstr "%s impossible d'assigner la couleur par défaut (\"%s\")\n" -#: src/common/weeconfig.c:915 +#: src/common/weeconfig.c:924 #, c-format msgid "%s config file \"%s\" not found.\n" msgstr "%s fichier de configuration \"%s\" non trouvé.\n" -#: src/common/weeconfig.c:947 +#: src/common/weeconfig.c:956 #, c-format msgid "%s %s, line %d: invalid syntax, missing \"]\"\n" msgstr "%s %s, ligne %d: syntaxe invalide, il manque \"]\"\n" -#: src/common/weeconfig.c:964 +#: src/common/weeconfig.c:973 #, c-format msgid "%s %s, line %d: unknown section identifier (\"%s\")\n" msgstr "%s %s, ligne %d: section inconnue (\"%s\")\n" -#: src/common/weeconfig.c:982 +#: src/common/weeconfig.c:991 #, c-format msgid "%s %s, line %d: invalid syntax, missing \"=\"\n" msgstr "%s %s, ligne %d: syntaxe invalide, il manque \"=\"\n" -#: src/common/weeconfig.c:1016 +#: src/common/weeconfig.c:1025 #, c-format msgid "%s %s, line %d: invalid option \"%s\"\n" msgstr "%s %s, ligne %d: option \"%s\" invalide\n" -#: src/common/weeconfig.c:1027 +#: src/common/weeconfig.c:1036 #, c-format msgid "" "%s %s, line %d: invalid value foroption '%s'\n" @@ -3212,7 +3248,7 @@ msgstr "" "%s %s, ligne %d: valeur invalide pour l'option '%s'\n" "Attendu: valeur booléenne: 'off' ou 'on'\n" -#: src/common/weeconfig.c:1036 +#: src/common/weeconfig.c:1045 #, c-format msgid "" "%s %s, line %d: invalid value for option '%s'\n" @@ -3221,7 +3257,7 @@ msgstr "" "%s %s, ligne %d: valeur invalide pour l'option '%s'\n" "Attendu: entier compris entre %d et %d\n" -#: src/common/weeconfig.c:1047 +#: src/common/weeconfig.c:1056 #, c-format msgid "" "%s %s, line %d: invalid value for option '%s'\n" @@ -3230,26 +3266,26 @@ msgstr "" "%s %s, ligne %d: valeur invalide pour l'option '%s'\n" "Attendu: une de ces chaînes: " -#: src/common/weeconfig.c:1063 +#: src/common/weeconfig.c:1072 #, c-format msgid "%s %s, line %d: invalid color name for option '%s'\n" msgstr "%s %s, ligne %d: nom de couleur invalide pour l'option '%s'\n" -#: src/common/weeconfig.c:1122 src/common/weeconfig.c:1291 +#: src/common/weeconfig.c:1131 src/common/weeconfig.c:1300 #, c-format msgid "%s cannot create file \"%s\"\n" msgstr "%s impossible de créer le fichier \"%s\"\n" -#: src/common/weeconfig.c:1128 +#: src/common/weeconfig.c:1137 #, c-format msgid "%s: creating default config file...\n" msgstr "%s: création du fichier de configuration par défaut...\n" -#: src/common/weeconfig.c:1129 +#: src/common/weeconfig.c:1138 msgid "creating default config file\n" msgstr "création du fichier de configuration par défaut\n" -#: src/common/weeconfig.c:1132 src/common/weeconfig.c:1300 +#: src/common/weeconfig.c:1141 src/common/weeconfig.c:1309 #, c-format msgid "" "#\n" @@ -3258,36 +3294,6 @@ msgstr "" "#\n" "# %s: fichier de configuration, créé par %s v%s le %s#\n" -#: src/common/weeconfig.c:1297 +#: src/common/weeconfig.c:1306 msgid "saving config to disk\n" msgstr "sauvegarde de la configuration sur disque\n" - -#~ msgid "name for log files" -#~ msgstr "nom des conversations sauvegardées" - -#~ msgid "" -#~ "name for log files (%S == irc server name, %N == channel name (or " -#~ "nickname if private chat)" -#~ msgstr "" -#~ "nom des conversations saivegardées (%S == nom du serveur irc, %N == nom " -#~ "du canal (ou pseudo si fenêtre privée)" - -#~ msgid "start string for log files" -#~ msgstr "chaîne de début pour les conversations sauvegardées" - -#~ msgid "" -#~ "text written when starting new log file (see man strftime for date/time " -#~ "specifiers)" -#~ msgstr "" -#~ "texte écrit en démarrant la sauvegarde d'une discussion (voir man " -#~ "strftime pour le format de date/heure)" - -#~ msgid "end string for log files" -#~ msgstr "chaîne de fin pour les conversations sauvegardées" - -#~ msgid "" -#~ "text written when ending log file (see man strftime for date/time " -#~ "specifiers)" -#~ msgstr "" -#~ "texte écrit à la fin d'une discussion sauvegardées (voir man strftime " -#~ "pour le format de date/heure)" diff --git a/weechat/po/weechat.pot b/weechat/po/weechat.pot index 2cb13fe6d..966b592b4 100644 --- a/weechat/po/weechat.pot +++ b/weechat/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: 2004-12-27 13:52+0100\n" +"POT-Creation-Date: 2004-12-27 17:09+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" @@ -20,95 +20,104 @@ msgstr "" msgid "%s cannot allocate new nick\n" msgstr "" -#: src/irc/irc-server.c:130 src/common/weeconfig.c:1241 +#: src/irc/irc-server.c:134 src/common/weeconfig.c:1250 msgid "Unable to get user's name" msgstr "" -#: src/irc/irc-server.c:195 +#: src/irc/irc-server.c:199 #, c-format msgid "%s cannot allocate new server\n" msgstr "" -#: src/irc/irc-server.c:386 +#: src/irc/irc-server.c:393 #, c-format msgid "%s error sending data to IRC server\n" msgstr "" -#: src/irc/irc-server.c:403 src/irc/irc-server.c:414 src/irc/irc-server.c:468 +#: src/irc/irc-server.c:410 src/irc/irc-server.c:421 src/irc/irc-server.c:475 #, c-format msgid "%s not enough memory for received IRC message\n" msgstr "" -#: src/irc/irc-server.c:475 +#: src/irc/irc-server.c:482 #, c-format msgid "%s unable to explode received buffer\n" msgstr "" -#: src/irc/irc-server.c:548 +#: src/irc/irc-server.c:555 #, c-format msgid "Command '%s' failed!\n" msgstr "" -#: src/irc/irc-server.c:552 +#: src/irc/irc-server.c:559 msgid "No command to execute!\n" msgstr "" -#: src/irc/irc-server.c:556 +#: src/irc/irc-server.c:563 #, c-format msgid "Unknown command: cmd=%s, args=%s\n" msgstr "" -#: src/irc/irc-server.c:594 +#: src/irc/irc-server.c:601 #, c-format msgid "%s cannot read data from socket, disconnecting from server...\n" msgstr "" -#: src/irc/irc-server.c:614 +#: src/irc/irc-server.c:622 #, c-format msgid "%s: connecting to %s:%d...\n" msgstr "" -#: src/irc/irc-server.c:616 +#: src/irc/irc-server.c:624 #, c-format msgid "connecting to server %s:%d...\n" msgstr "" -#: src/irc/irc-server.c:624 +#: src/irc/irc-server.c:632 #, c-format msgid "%s cannot create pipe\n" msgstr "" -#: src/irc/irc-server.c:638 +#: src/irc/irc-server.c:646 #, c-format msgid "%s cannot set socket option \"SO_REUSEADDR\"\n" msgstr "" -#: src/irc/irc-server.c:645 +#: src/irc/irc-server.c:653 #, c-format msgid "%s cannot set socket option \"SO_KEEPALIVE\"\n" msgstr "" -#: src/irc/irc-server.c:653 +#: src/irc/irc-server.c:661 #, c-format msgid "%s address \"%s\" not found\n" msgstr "" -#: src/irc/irc-server.c:676 +#: src/irc/irc-server.c:684 #, c-format msgid "%s IP address not found\n" msgstr "" -#: src/irc/irc-server.c:686 +#: src/irc/irc-server.c:694 #, c-format msgid "%s: server IP is: %s\n" msgstr "" -#: src/irc/irc-server.c:692 +#: src/irc/irc-server.c:700 #, c-format msgid "%s cannot connect to irc server\n" msgstr "" -#: src/irc/irc-server.c:741 +#: src/irc/irc-server.c:718 +msgid "Reconnecting to server...\n" +msgstr "" + +#: src/irc/irc-server.c:729 src/irc/irc-server.c:798 +#, c-format +msgid "Reconnecting to server in %d seconds\n" +msgstr "" + +#: src/irc/irc-server.c:773 msgid "Disconnected from server!\n" msgstr "" @@ -1051,7 +1060,7 @@ msgstr "" msgid "can't change mode for other users" msgstr "" -#: src/irc/irc-send.c:58 src/irc/irc-recv.c:2934 +#: src/irc/irc-send.c:58 src/irc/irc-recv.c:2961 msgid "unknown" msgstr "" @@ -1083,7 +1092,7 @@ msgstr "" msgid "%s cannot create new private window \"%s\"\n" msgstr "" -#: src/irc/irc-send.c:670 src/irc/irc-send.c:741 src/common/command.c:1304 +#: src/irc/irc-send.c:670 src/irc/irc-send.c:741 src/common/command.c:1302 #, c-format msgid "%s wrong argument count for \"%s\" command\n" msgstr "" @@ -1103,7 +1112,7 @@ msgid " has joined " msgstr "" #: src/irc/irc-recv.c:229 src/irc/irc-recv.c:593 src/irc/irc-recv.c:899 -#: src/irc/irc-recv.c:1039 src/irc/irc-recv.c:2434 src/irc/irc-recv.c:2499 +#: src/irc/irc-recv.c:1039 src/irc/irc-recv.c:2449 src/irc/irc-recv.c:2514 #, c-format msgid "%s channel not found for \"%s\" command\n" msgstr "" @@ -1277,8 +1286,8 @@ msgid "from" msgstr "" #: src/irc/irc-recv.c:1123 src/irc/irc-recv.c:1137 src/irc/irc-recv.c:1152 -#: src/irc/irc-recv.c:1167 src/irc/irc-recv.c:1261 src/irc/irc-recv.c:2720 -#: src/irc/irc-recv.c:2760 +#: src/irc/irc-recv.c:1167 src/irc/irc-recv.c:1261 src/irc/irc-recv.c:2735 +#: src/irc/irc-recv.c:2775 #, c-format msgid "%s cannot parse \"%s\" command\n" msgstr "" @@ -1310,161 +1319,166 @@ msgstr "" msgid " has unset topic for " msgstr "" -#: src/irc/irc-recv.c:1570 +#: src/irc/irc-recv.c:1585 #, c-format msgid " is away: %s\n" msgstr "" -#: src/irc/irc-recv.c:1644 +#: src/irc/irc-recv.c:1659 msgid "Users online: " msgstr "" -#: src/irc/irc-recv.c:2007 +#: src/irc/irc-recv.c:2022 msgid "idle: " msgstr "" -#: src/irc/irc-recv.c:2015 +#: src/irc/irc-recv.c:2030 msgid "days" msgstr "" -#: src/irc/irc-recv.c:2015 +#: src/irc/irc-recv.c:2030 msgid "day" msgstr "" -#: src/irc/irc-recv.c:2025 +#: src/irc/irc-recv.c:2040 msgid "hours" msgstr "" -#: src/irc/irc-recv.c:2025 +#: src/irc/irc-recv.c:2040 msgid "hour" msgstr "" -#: src/irc/irc-recv.c:2031 +#: src/irc/irc-recv.c:2046 msgid "minutes" msgstr "" -#: src/irc/irc-recv.c:2031 +#: src/irc/irc-recv.c:2046 msgid "minute" msgstr "" -#: src/irc/irc-recv.c:2037 +#: src/irc/irc-recv.c:2052 msgid "seconds" msgstr "" -#: src/irc/irc-recv.c:2037 +#: src/irc/irc-recv.c:2052 msgid "second" msgstr "" -#: src/irc/irc-recv.c:2042 +#: src/irc/irc-recv.c:2057 msgid "signon at: " msgstr "" -#: src/irc/irc-recv.c:2130 +#: src/irc/irc-recv.c:2145 msgid "Channels: " msgstr "" -#: src/irc/irc-recv.c:2381 +#: src/irc/irc-recv.c:2396 msgid "No topic set for " msgstr "" -#: src/irc/irc-recv.c:2423 +#: src/irc/irc-recv.c:2438 msgid "Topic for " msgstr "" -#: src/irc/irc-recv.c:2427 +#: src/irc/irc-recv.c:2442 #, c-format msgid " is: \"%s\"\n" msgstr "" -#: src/irc/irc-recv.c:2443 src/irc/irc-recv.c:2523 +#: src/irc/irc-recv.c:2458 src/irc/irc-recv.c:2538 #, c-format msgid "%s cannot identify channel for \"%s\" command\n" msgstr "" -#: src/irc/irc-recv.c:2489 +#: src/irc/irc-recv.c:2504 msgid "Topic set by " msgstr "" -#: src/irc/irc-recv.c:2507 +#: src/irc/irc-recv.c:2522 #, c-format msgid "%s cannot identify date/time for \"%s\" command\n" msgstr "" -#: src/irc/irc-recv.c:2515 +#: src/irc/irc-recv.c:2530 #, c-format msgid "%s cannot identify nickname for \"%s\" command\n" msgstr "" -#: src/irc/irc-recv.c:2644 +#: src/irc/irc-recv.c:2659 msgid " on " msgstr "" -#: src/irc/irc-recv.c:2751 +#: src/irc/irc-recv.c:2766 #, c-format msgid "%s cannot create nick \"%s\" for channel \"%s\"\n" msgstr "" -#: src/irc/irc-recv.c:2804 +#: src/irc/irc-recv.c:2819 msgid "Nicks " msgstr "" -#: src/irc/irc-recv.c:2824 +#: src/irc/irc-recv.c:2839 msgid "Channel " msgstr "" -#: src/irc/irc-recv.c:2835 +#: src/irc/irc-recv.c:2850 msgid "nicks" msgstr "" -#: src/irc/irc-recv.c:2835 +#: src/irc/irc-recv.c:2850 msgid "nick" msgstr "" -#: src/irc/irc-recv.c:2843 +#: src/irc/irc-recv.c:2858 msgid "ops" msgstr "" -#: src/irc/irc-recv.c:2843 +#: src/irc/irc-recv.c:2858 msgid "op" msgstr "" -#: src/irc/irc-recv.c:2852 +#: src/irc/irc-recv.c:2867 msgid "halfops" msgstr "" -#: src/irc/irc-recv.c:2852 +#: src/irc/irc-recv.c:2867 msgid "halfop" msgstr "" -#: src/irc/irc-recv.c:2861 +#: src/irc/irc-recv.c:2876 msgid "voices" msgstr "" -#: src/irc/irc-recv.c:2861 +#: src/irc/irc-recv.c:2876 msgid "voice" msgstr "" -#: src/irc/irc-recv.c:2870 +#: src/irc/irc-recv.c:2885 msgid "normal" msgstr "" -#: src/irc/irc-recv.c:2903 +#: src/irc/irc-recv.c:2918 #, c-format msgid "%s: nickname \"%s\" is already in use, trying 2nd nickname \"%s\"\n" msgstr "" -#: src/irc/irc-recv.c:2914 +#: src/irc/irc-recv.c:2929 #, c-format msgid "%s: nickname \"%s\" is already in use, trying 3rd nickname \"%s\"\n" msgstr "" -#: src/irc/irc-recv.c:2923 +#: src/irc/irc-recv.c:2940 #, c-format msgid "" "%s: all declared nicknames are already in use, closing connection with " "server!\n" msgstr "" +#: src/irc/irc-recv.c:2949 +#, c-format +msgid "%s: nickname \"%s\" is already in use, trying 1st nickname \"%s\"\n" +msgstr "" + #: src/irc/irc-dcc.c:44 msgid "Waiting" msgstr "" @@ -1917,7 +1931,7 @@ msgstr "" msgid "Opened buffers:\n" msgstr "" -#: src/common/command.c:858 src/common/command.c:1353 +#: src/common/command.c:858 src/common/command.c:1351 msgid "Server: " msgstr "" @@ -1957,217 +1971,221 @@ msgstr "" msgid "unknown parameter \"%s\" for \"%s\" command\n" msgstr "" -#: src/common/command.c:1040 +#: src/common/command.c:1039 #, c-format msgid "%s already connected to server \"%s\"!\n" msgstr "" -#: src/common/command.c:1063 src/common/command.c:1098 +#: src/common/command.c:1058 src/common/command.c:1096 #, c-format msgid "%s server \"%s\" not found\n" msgstr "" -#: src/common/command.c:1088 +#: src/common/command.c:1083 #, c-format msgid "%s not connected to server \"%s\"!\n" msgstr "" -#: src/common/command.c:1117 +#: src/common/command.c:1089 +msgid "Auto-reconnection is cancelled\n" +msgstr "" + +#: src/common/command.c:1115 #, c-format msgid "> List of %s internal commands:\n" msgstr "" -#: src/common/command.c:1122 +#: src/common/command.c:1120 msgid "> List of IRC commands:\n" msgstr "" -#: src/common/command.c:1137 +#: src/common/command.c:1135 #, c-format msgid "> Help on %s internal command \"%s\":\n" msgstr "" -#: src/common/command.c:1140 src/common/command.c:1161 +#: src/common/command.c:1138 src/common/command.c:1159 #, c-format msgid "Syntax: /%s %s\n" msgstr "" -#: src/common/command.c:1159 +#: src/common/command.c:1157 #, c-format msgid "> Help on IRC command \"%s\":\n" msgstr "" -#: src/common/command.c:1175 +#: src/common/command.c:1173 #, c-format msgid "No help available, \"%s\" is an unknown command\n" msgstr "" -#: src/common/command.c:1200 +#: src/common/command.c:1198 msgid "Registered Perl scripts:\n" msgstr "" -#: src/common/command.c:1217 src/common/command.c:1239 -#: src/common/command.c:1261 +#: src/common/command.c:1215 src/common/command.c:1237 +#: src/common/command.c:1259 msgid " (none)\n" msgstr "" -#: src/common/command.c:1222 +#: src/common/command.c:1220 msgid "Perl message handlers:\n" msgstr "" -#: src/common/command.c:1231 +#: src/common/command.c:1229 #, c-format msgid " IRC(%s) => Perl(%s)\n" msgstr "" -#: src/common/command.c:1244 +#: src/common/command.c:1242 msgid "Perl command handlers:\n" msgstr "" -#: src/common/command.c:1253 +#: src/common/command.c:1251 #, c-format msgid " Command /%s => Perl(%s)\n" msgstr "" -#: src/common/command.c:1273 +#: src/common/command.c:1271 msgid "Perl scripts unloaded\n" msgstr "" -#: src/common/command.c:1298 src/common/command.c:1836 +#: src/common/command.c:1296 src/common/command.c:1836 #, c-format msgid "%s unknown option for \"%s\" command\n" msgstr "" -#: src/common/command.c:1309 +#: src/common/command.c:1307 msgid "" "WeeChat was build without Perl support.\n" "Please rebuild WeeChat with \"--enable-perl\" option for ./configure script\n" msgstr "" -#: src/common/command.c:1364 +#: src/common/command.c:1362 msgid "connected" msgstr "" -#: src/common/command.c:1364 +#: src/common/command.c:1362 msgid "not connected" msgstr "" -#: src/common/command.c:1371 +#: src/common/command.c:1369 #, c-format msgid " Autoconnect: %s%s\n" msgstr "" -#: src/common/command.c:1372 +#: src/common/command.c:1370 msgid "yes" msgstr "" -#: src/common/command.c:1372 +#: src/common/command.c:1370 msgid "no" msgstr "" -#: src/common/command.c:1374 +#: src/common/command.c:1372 msgid " (temporary server, will not be saved)" msgstr "" -#: src/common/command.c:1379 +#: src/common/command.c:1377 #, c-format msgid " Hostname : %s\n" msgstr "" -#: src/common/command.c:1384 +#: src/common/command.c:1382 #, c-format msgid " Port : %d\n" msgstr "" -#: src/common/command.c:1390 +#: src/common/command.c:1388 msgid " Password : (hidden)\n" msgstr "" -#: src/common/command.c:1394 +#: src/common/command.c:1392 msgid " Password : (none)\n" msgstr "" -#: src/common/command.c:1398 +#: src/common/command.c:1396 #, c-format msgid " Nicks : %s" msgstr "" -#: src/common/command.c:1415 +#: src/common/command.c:1413 #, c-format msgid " Username : %s\n" msgstr "" -#: src/common/command.c:1420 +#: src/common/command.c:1418 #, c-format msgid " Realname : %s\n" msgstr "" -#: src/common/command.c:1426 +#: src/common/command.c:1424 #, c-format msgid " Command : %s\n" msgstr "" -#: src/common/command.c:1431 +#: src/common/command.c:1429 msgid " Command : (none)\n" msgstr "" -#: src/common/command.c:1436 +#: src/common/command.c:1434 #, c-format msgid " Auto-join : %s\n" msgstr "" -#: src/common/command.c:1441 +#: src/common/command.c:1439 msgid " Auto-join : (none)\n" msgstr "" -#: src/common/command.c:1445 +#: src/common/command.c:1443 msgid "No server.\n" msgstr "" -#: src/common/command.c:1454 +#: src/common/command.c:1452 #, c-format msgid "%s missing servername for \"%s\" command\n" msgstr "" -#: src/common/command.c:1460 +#: src/common/command.c:1458 #, c-format msgid "%s too much arguments for \"%s\" command, ignoring arguments\n" msgstr "" -#: src/common/command.c:1477 +#: src/common/command.c:1475 #, c-format msgid "%s server \"%s\" not found for \"%s\" command\n" msgstr "" -#: src/common/command.c:1483 src/common/command.c:1614 +#: src/common/command.c:1481 src/common/command.c:1614 msgid "Server" msgstr "" -#: src/common/command.c:1486 +#: src/common/command.c:1484 msgid "has been deleted\n" msgstr "" -#: src/common/command.c:1500 +#: src/common/command.c:1498 #, c-format msgid "%s missing parameters for \"%s\" command\n" msgstr "" -#: src/common/command.c:1509 +#: src/common/command.c:1507 #, c-format msgid "%s server \"%s\" already exists, can't create it!\n" msgstr "" -#: src/common/command.c:1533 src/common/command.c:1559 -#: src/common/command.c:1571 src/common/command.c:1595 +#: src/common/command.c:1531 src/common/command.c:1557 +#: src/common/command.c:1569 src/common/command.c:1593 #, c-format msgid "%s missing password for \"%s\" parameter\n" msgstr "" -#: src/common/command.c:1545 +#: src/common/command.c:1543 #, c-format msgid "%s missing nick(s) for \"%s\" parameter\n" msgstr "" -#: src/common/command.c:1583 +#: src/common/command.c:1581 #, c-format msgid "%s missing command for \"%s\" parameter\n" msgstr "" @@ -2297,52 +2315,52 @@ msgstr "" msgid "%s invalid syntax for IRC server ('%s'), ignored\n" msgstr "" -#: src/common/weechat.c:236 +#: src/common/weechat.c:238 #, c-format msgid "%s unable to create server ('%s'), ignored\n" msgstr "" -#: src/common/weechat.c:245 +#: src/common/weechat.c:247 #, c-format msgid "%s unknown parameter '%s', ignored\n" msgstr "" -#: src/common/weechat.c:265 +#: src/common/weechat.c:267 #, c-format msgid "%s cannot create directory \"%s\"\n" msgstr "" -#: src/common/weechat.c:291 +#: src/common/weechat.c:293 #, c-format msgid "%s unable to get HOME directory\n" msgstr "" -#: src/common/weechat.c:300 +#: src/common/weechat.c:302 #, c-format msgid "%s not enough memory for home directory\n" msgstr "" -#: src/common/weechat.c:310 +#: src/common/weechat.c:312 #, c-format msgid "%s unable to create ~/.weechat directory\n" msgstr "" -#: src/common/weechat.c:362 +#: src/common/weechat.c:364 #, c-format msgid "%s unable to create ~/.weechat/logs directory\n" msgstr "" -#: src/common/weechat.c:397 +#: src/common/weechat.c:399 #, c-format msgid "%s unable to create/append to log file (~/.weechat/%s)" msgstr "" -#: src/common/weechat.c:420 +#: src/common/weechat.c:422 #, c-format msgid "%sWelcome to " msgstr "" -#: src/common/weechat.c:433 +#: src/common/weechat.c:435 msgid "compiled on" msgstr "" @@ -2865,194 +2883,210 @@ msgid "automatically connect to server when WeeChat is starting" msgstr "" #: src/common/weeconfig.c:537 -msgid "server address or hostname" +msgid "automatically reconnect to server" msgstr "" #: src/common/weeconfig.c:538 -msgid "IP address or hostname of IRC server" +msgid "automatically reconnect to server when disconnected" msgstr "" #: src/common/weeconfig.c:541 -msgid "port for IRC server" +msgid "delay before trying again to reconnect" msgstr "" #: src/common/weeconfig.c:542 -msgid "port for connecting to server" +msgid "delay (in deconds) before trying again to reconnect to server" msgstr "" #: src/common/weeconfig.c:545 -msgid "server password" +msgid "server address or hostname" msgstr "" #: src/common/weeconfig.c:546 -msgid "password for IRC server" +msgid "IP address or hostname of IRC server" msgstr "" #: src/common/weeconfig.c:549 -msgid "nickname for server" +msgid "port for IRC server" msgstr "" #: src/common/weeconfig.c:550 -msgid "nickname to use on IRC server" +msgid "port for connecting to server" msgstr "" #: src/common/weeconfig.c:553 -msgid "alternate nickname for server" +msgid "server password" msgstr "" #: src/common/weeconfig.c:554 -msgid "alternate nickname to use on IRC server (if nickname is already used)" +msgid "password for IRC server" msgstr "" #: src/common/weeconfig.c:557 -msgid "2nd alternate nickname for server" +msgid "nickname for server" msgstr "" #: src/common/weeconfig.c:558 +msgid "nickname to use on IRC server" +msgstr "" + +#: src/common/weeconfig.c:561 +msgid "alternate nickname for server" +msgstr "" + +#: src/common/weeconfig.c:562 +msgid "alternate nickname to use on IRC server (if nickname is already used)" +msgstr "" + +#: src/common/weeconfig.c:565 +msgid "2nd alternate nickname for server" +msgstr "" + +#: src/common/weeconfig.c:566 msgid "" "2nd alternate nickname to use on IRC server (if alternate nickname is " "already used)" msgstr "" -#: src/common/weeconfig.c:561 +#: src/common/weeconfig.c:569 msgid "user name for server" msgstr "" -#: src/common/weeconfig.c:562 +#: src/common/weeconfig.c:570 msgid "user name to use on IRC server" msgstr "" -#: src/common/weeconfig.c:565 +#: src/common/weeconfig.c:573 msgid "real name for server" msgstr "" -#: src/common/weeconfig.c:566 +#: src/common/weeconfig.c:574 msgid "real name to use on IRC server" msgstr "" -#: src/common/weeconfig.c:569 src/common/weeconfig.c:570 +#: src/common/weeconfig.c:577 src/common/weeconfig.c:578 msgid "first command to run when connected to server" msgstr "" -#: src/common/weeconfig.c:573 +#: src/common/weeconfig.c:581 msgid "delay (in seconds) after command was executed" msgstr "" -#: src/common/weeconfig.c:574 +#: src/common/weeconfig.c:582 msgid "" "delay (in seconds) after command was executed (example: give some time for " "authentication)" msgstr "" -#: src/common/weeconfig.c:577 +#: src/common/weeconfig.c:585 msgid "list of channels to join when connected to server" msgstr "" -#: src/common/weeconfig.c:578 +#: src/common/weeconfig.c:586 msgid "comma separated list of channels to join when connected to server" msgstr "" -#: src/common/weeconfig.c:581 src/common/weeconfig.c:582 +#: src/common/weeconfig.c:589 src/common/weeconfig.c:590 msgid "automatically rejoin channels when kicked" msgstr "" -#: src/common/weeconfig.c:804 +#: src/common/weeconfig.c:812 #, c-format msgid "%s %s, line %d: new server, but previous was incomplete\n" msgstr "" -#: src/common/weeconfig.c:813 +#: src/common/weeconfig.c:821 #, c-format msgid "%s %s, line %d: server '%s' already exists\n" msgstr "" -#: src/common/weeconfig.c:826 +#: src/common/weeconfig.c:835 #, c-format msgid "%s %s, line %d: unable to create server\n" msgstr "" -#: src/common/weeconfig.c:865 +#: src/common/weeconfig.c:874 #, c-format msgid "%s unable to assign default int with string (\"%s\")\n" msgstr "" -#: src/common/weeconfig.c:876 +#: src/common/weeconfig.c:885 #, c-format msgid "%s unable to assign default color (\"%s\")\n" msgstr "" -#: src/common/weeconfig.c:915 +#: src/common/weeconfig.c:924 #, c-format msgid "%s config file \"%s\" not found.\n" msgstr "" -#: src/common/weeconfig.c:947 +#: src/common/weeconfig.c:956 #, c-format msgid "%s %s, line %d: invalid syntax, missing \"]\"\n" msgstr "" -#: src/common/weeconfig.c:964 +#: src/common/weeconfig.c:973 #, c-format msgid "%s %s, line %d: unknown section identifier (\"%s\")\n" msgstr "" -#: src/common/weeconfig.c:982 +#: src/common/weeconfig.c:991 #, c-format msgid "%s %s, line %d: invalid syntax, missing \"=\"\n" msgstr "" -#: src/common/weeconfig.c:1016 +#: src/common/weeconfig.c:1025 #, c-format msgid "%s %s, line %d: invalid option \"%s\"\n" msgstr "" -#: src/common/weeconfig.c:1027 +#: src/common/weeconfig.c:1036 #, c-format msgid "" "%s %s, line %d: invalid value foroption '%s'\n" "Expected: boolean value: 'off' or 'on'\n" msgstr "" -#: src/common/weeconfig.c:1036 +#: src/common/weeconfig.c:1045 #, c-format msgid "" "%s %s, line %d: invalid value for option '%s'\n" "Expected: integer between %d and %d\n" msgstr "" -#: src/common/weeconfig.c:1047 +#: src/common/weeconfig.c:1056 #, c-format msgid "" "%s %s, line %d: invalid value for option '%s'\n" "Expected: one of these strings: " msgstr "" -#: src/common/weeconfig.c:1063 +#: src/common/weeconfig.c:1072 #, c-format msgid "%s %s, line %d: invalid color name for option '%s'\n" msgstr "" -#: src/common/weeconfig.c:1122 src/common/weeconfig.c:1291 +#: src/common/weeconfig.c:1131 src/common/weeconfig.c:1300 #, c-format msgid "%s cannot create file \"%s\"\n" msgstr "" -#: src/common/weeconfig.c:1128 +#: src/common/weeconfig.c:1137 #, c-format msgid "%s: creating default config file...\n" msgstr "" -#: src/common/weeconfig.c:1129 +#: src/common/weeconfig.c:1138 msgid "creating default config file\n" msgstr "" -#: src/common/weeconfig.c:1132 src/common/weeconfig.c:1300 +#: src/common/weeconfig.c:1141 src/common/weeconfig.c:1309 #, c-format msgid "" "#\n" "# %s configuration file, created by %s v%s on %s#\n" msgstr "" -#: src/common/weeconfig.c:1297 +#: src/common/weeconfig.c:1306 msgid "saving config to disk\n" msgstr "" diff --git a/weechat/src/common/command.c b/weechat/src/common/command.c index 1c2af058c..6a5a1a663 100644 --- a/weechat/src/common/command.c +++ b/weechat/src/common/command.c @@ -1026,7 +1026,6 @@ int weechat_cmd_connect (int argc, char **argv) { t_irc_server *ptr_server; - t_irc_channel *ptr_channel; /* make gcc happy */ (void) argc; @@ -1048,13 +1047,9 @@ weechat_cmd_connect (int argc, char **argv) } if (server_connect (ptr_server)) { + ptr_server->reconnect_start = 0; + ptr_server->reconnect_join = (ptr_server->channels) ? 1 : 0; irc_login (ptr_server); - for (ptr_channel = ptr_server->channels; ptr_channel; - ptr_channel = ptr_channel->next_channel) - { - if (ptr_channel->type == CHAT_CHANNEL) - server_sendf (ptr_server, "JOIN %s\r\n", ptr_channel->name); - } } } else @@ -1082,14 +1077,17 @@ weechat_cmd_disconnect (int argc, char **argv) ptr_server = server_search (argv[0]); if (ptr_server) { - if (!ptr_server->is_connected) + if ((!ptr_server->is_connected) && (ptr_server->reconnect_start == 0)) { - gui_printf (NULL, + gui_printf (ptr_server->buffer, _("%s not connected to server \"%s\"!\n"), WEECHAT_ERROR, argv[0]); return -1; } - server_disconnect (ptr_server); + if (ptr_server->reconnect_start > 0) + gui_printf (ptr_server->buffer, + _("Auto-reconnection is cancelled\n")); + server_disconnect (ptr_server, 0); gui_draw_buffer_status (gui_current_window->buffer, 1); } else @@ -1603,8 +1601,10 @@ weechat_cmd_server (int argc, char **argv) } /* create new server */ - new_server = server_new (server.name, server.autoconnect, 0, - server.address, server.port, server.password, + new_server = server_new (server.name, server.autoconnect, + server.autoreconnect, + server.autoreconnect_delay, + 0, server.address, server.port, server.password, server.nick1, server.nick2, server.nick3, server.username, server.realname, server.command, 1, server.autojoin, 1); diff --git a/weechat/src/common/weechat.c b/weechat/src/common/weechat.c index c22d8201e..6d424a17a 100644 --- a/weechat/src/common/weechat.c +++ b/weechat/src/common/weechat.c @@ -228,8 +228,10 @@ wee_parse_args (int argc, char *argv[]) } else { - if (!server_new (server_tmp.name, 0, 1, - server_tmp.address, server_tmp.port, + if (!server_new (server_tmp.name, server_tmp.autoconnect, + server_tmp.autoreconnect, + server_tmp.autoreconnect_delay, + 1, server_tmp.address, server_tmp.port, server_tmp.password, server_tmp.nick1, server_tmp.nick2, server_tmp.nick3, NULL, NULL, NULL, 0, server_tmp.autojoin, 1)) diff --git a/weechat/src/common/weeconfig.c b/weechat/src/common/weeconfig.c index 7569b7079..e3c0ca190 100644 --- a/weechat/src/common/weeconfig.c +++ b/weechat/src/common/weeconfig.c @@ -534,6 +534,14 @@ t_config_option weechat_options_server[] = N_("automatically connect to server when WeeChat is starting"), OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE, NULL, NULL, &(cfg_server.autoconnect), NULL, NULL }, + { "server_autoreconnect", N_("automatically reconnect to server"), + N_("automatically reconnect to server when disconnected"), + OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE, + NULL, NULL, &(cfg_server.autoreconnect), NULL, NULL }, + { "server_autoreconnect_delay", N_("delay before trying again to reconnect"), + N_("delay (in deconds) before trying again to reconnect to server"), + OPTION_TYPE_INT, 0, 65535, 30, + NULL, NULL, &(cfg_server.autoreconnect_delay), NULL, NULL }, { "server_address", N_("server address or hostname"), N_("IP address or hostname of IRC server"), OPTION_TYPE_STRING, 0, 0, 0, @@ -815,7 +823,8 @@ config_allocate_server (char *filename, int line_number) return 0; } if (!server_new (cfg_server.name, - cfg_server.autoconnect, 0, cfg_server.address, cfg_server.port, + cfg_server.autoconnect, cfg_server.autoreconnect, + cfg_server.autoreconnect_delay, 0, cfg_server.address, cfg_server.port, cfg_server.password, cfg_server.nick1, cfg_server.nick2, cfg_server.nick3, cfg_server.username, cfg_server.realname, cfg_server.command, cfg_server.command_delay, cfg_server.autojoin, @@ -1374,6 +1383,10 @@ config_write (char *config_name) fprintf (file, "server_name=%s\n", ptr_server->name); fprintf (file, "server_autoconnect=%s\n", (ptr_server->autoconnect) ? "on" : "off"); + fprintf (file, "server_autoreconnect=%s\n", + (ptr_server->autoreconnect) ? "on" : "off"); + fprintf (file, "server_autoreconnect_delay=%d\n", + ptr_server->autoreconnect_delay); fprintf (file, "server_address=%s\n", ptr_server->address); fprintf (file, "server_port=%d\n", ptr_server->port); fprintf (file, "server_password=%s\n", diff --git a/weechat/src/gui/curses/gui-input.c b/weechat/src/gui/curses/gui-input.c index dfa245b6d..6c805742b 100644 --- a/weechat/src/gui/curses/gui-input.c +++ b/weechat/src/gui/curses/gui-input.c @@ -627,8 +627,14 @@ gui_main_loop () for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server) { - if (ptr_server->sock4 >= 0) - FD_SET (ptr_server->sock4, &read_fd); + /* check if reconnection is pending */ + if ((!ptr_server->is_connected) + && (ptr_server->reconnect_start > 0) + && (new_time >= (ptr_server->reconnect_start + ptr_server->autoreconnect_delay))) + server_reconnect (ptr_server); + else + if (ptr_server->sock4 >= 0) + FD_SET (ptr_server->sock4, &read_fd); } if (select (FD_SETSIZE, &read_fd, NULL, NULL, &timeout)) { diff --git a/weechat/src/irc/irc-recv.c b/weechat/src/irc/irc-recv.c index fb36faac4..29fb649da 100644 --- a/weechat/src/irc/irc-recv.c +++ b/weechat/src/irc/irc-recv.c @@ -99,7 +99,7 @@ irc_cmd_recv_error (t_irc_server *server, char *host, char *arguments) if (strncmp (arguments, "Closing Link", 12) == 0) { - server_disconnect (server); + server_disconnect (server, 1); return 0; } @@ -1500,6 +1500,7 @@ int irc_cmd_recv_004 (t_irc_server *server, char *host, char *arguments) { char *pos; + t_irc_channel *ptr_channel; /* make gcc happy */ (void) host; @@ -1528,9 +1529,23 @@ irc_cmd_recv_004 (t_irc_server *server, char *host, char *arguments) sleep (server->command_delay); } - /* autojoin */ - if (server->autojoin && server->autojoin[0]) - return irc_cmd_send_join (server, server->autojoin); + /* auto-join after disconnection (only rejoins opened channels) */ + if (server->reconnect_join) + { + for (ptr_channel = server->channels; ptr_channel; + ptr_channel = ptr_channel->next_channel) + { + if (ptr_channel->type == CHAT_CHANNEL) + server_sendf (server, "JOIN %s\r\n", ptr_channel->name); + } + server->reconnect_join = 0; + } + else + { + /* auto-join when connecting to server for first time */ + if (server->autojoin && server->autojoin[0]) + return irc_cmd_send_join (server, server->autojoin); + } return 0; } @@ -2919,12 +2934,24 @@ irc_cmd_recv_433 (t_irc_server *server, char *host, char *arguments) } else { - gui_printf (server->buffer, - _("%s: all declared nicknames are already in use, " - "closing connection with server!\n"), - PACKAGE_NAME); - server_disconnect (server); - return 0; + if (strcmp (server->nick, server->nick3) == 0) + { + gui_printf (server->buffer, + _("%s: all declared nicknames are already in use, " + "closing connection with server!\n"), + PACKAGE_NAME); + server_disconnect (server, 1); + return 0; + } + else + { + gui_printf (server->buffer, + _("%s: nickname \"%s\" is already in use, " + "trying 1st nickname \"%s\"\n"), + PACKAGE_NAME, server->nick, server->nick1); + free (server->nick); + server->nick = strdup (server->nick1); + } } } diff --git a/weechat/src/irc/irc-server.c b/weechat/src/irc/irc-server.c index 7ca269351..e054e32b1 100644 --- a/weechat/src/irc/irc-server.c +++ b/weechat/src/irc/irc-server.c @@ -59,7 +59,9 @@ void server_init (t_irc_server *server) { server->name = NULL; - server->autoconnect = 0; + server->autoconnect = 1; + server->autoreconnect = 1; + server->autoreconnect_delay = 30; server->command_line = 0; server->address = NULL; server->port = -1; @@ -74,6 +76,8 @@ server_init (t_irc_server *server) server->autojoin = NULL; server->nick = NULL; server->is_connected = 0; + server->reconnect_start = 0; + server->reconnect_join = 0; server->sock4 = -1; server->is_away = 0; server->server_read = -1; @@ -291,10 +295,11 @@ server_free_all () */ t_irc_server * -server_new (char *name, int autoconnect, int command_line, char *address, - int port, char *password, char *nick1, char *nick2, char *nick3, - char *username, char *realname, char *command, int command_delay, - char *autojoin, int autorejoin) +server_new (char *name, int autoconnect, int autoreconnect, int autoreconnect_delay, + int command_line, char *address, int port, char *password, + char *nick1, char *nick2, char *nick3, char *username, + char *realname, char *command, int command_delay, char *autojoin, + int autorejoin) { t_irc_server *new_server; @@ -316,6 +321,8 @@ server_new (char *name, int autoconnect, int command_line, char *address, { new_server->name = strdup (name); new_server->autoconnect = autoconnect; + new_server->autoreconnect = autoreconnect; + new_server->autoreconnect_delay = autoreconnect_delay; new_server->command_line = command_line; new_server->address = strdup (address); new_server->port = port; @@ -591,8 +598,9 @@ server_recv (t_irc_server *server) else { gui_printf (server->buffer, - _("%s cannot read data from socket, disconnecting from server...\n")); - server_disconnect (server); + _("%s cannot read data from socket, disconnecting from server...\n"), + WEECHAT_ERROR); + server_disconnect (server, 1); } } @@ -701,6 +709,29 @@ server_connect (t_irc_server *server) } /* + * server_reconnect: reconnect to a server (after disconnection) + */ + +void +server_reconnect (t_irc_server *server) +{ + gui_printf (server->buffer, _("Reconnecting to server...\n")); + server->reconnect_start = 0; + + if (server_connect (server)) + { + server->reconnect_join = 1; + irc_login (server); + } + else + { + server->reconnect_start = time (NULL); + gui_printf (server->buffer, _("Reconnecting to server in %d seconds\n"), + server->autoreconnect_delay); + } +} + +/* * server_auto_connect: auto-connect to servers (called at startup) */ @@ -727,7 +758,7 @@ server_auto_connect (int command_line) */ void -server_disconnect (t_irc_server *server) +server_disconnect (t_irc_server *server, int reconnect) { t_irc_channel *ptr_channel; @@ -737,17 +768,38 @@ server_disconnect (t_irc_server *server) for (ptr_channel = server->channels; ptr_channel; ptr_channel = ptr_channel->next_channel) { + nick_free_all (ptr_channel); irc_display_prefix (ptr_channel->buffer, PREFIX_INFO); gui_printf (ptr_channel->buffer, _("Disconnected from server!\n")); } - - /* close communication with server */ + gui_draw_buffer_nick (gui_current_window->buffer, 1); + gui_draw_buffer_status (gui_current_window->buffer, 1); + } + + /* close communication with server */ + if (server->server_read >= 0) close (server->server_read); + server->server_read = -1; + + if (server->server_write >= 0) close (server->server_write); + server->server_write = -1; + + + if (server->sock4 >= 0) close (server->sock4); - server->is_connected = 0; - server->sock4 = -1; + server->sock4 = -1; + + server->is_connected = 0; + + if ((reconnect) && (server->autoreconnect)) + { + server->reconnect_start = time (NULL); + gui_printf (server->buffer, _("Reconnecting to server in %d seconds\n"), + server->autoreconnect_delay); } + else + server->reconnect_start = 0; } /* @@ -760,7 +812,7 @@ server_disconnect_all () t_irc_server *ptr_server; for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server) - server_disconnect (ptr_server); + server_disconnect (ptr_server, 0); } /* diff --git a/weechat/src/irc/irc.h b/weechat/src/irc/irc.h index dbbcce649..b2a4fb6b5 100644 --- a/weechat/src/irc/irc.h +++ b/weechat/src/irc/irc.h @@ -116,6 +116,8 @@ struct t_irc_server /* user choices */ char *name; /* name of server (only for display) */ int autoconnect; /* = 1 if auto connect at startup */ + int autoreconnect; /* = 1 if auto reco when disconnected */ + int autoreconnect_delay; /* delay before trying again reconnect */ int command_line; /* server was given on command line */ char *address; /* address of server (IP or name) */ int port; /* port for server (6667 by default) */ @@ -133,6 +135,8 @@ struct t_irc_server /* internal vars */ char *nick; /* current nickname */ int is_connected; /* 1 if WeeChat is connected to server */ + time_t reconnect_start; /* this time + delay = reconnect time */ + int reconnect_join; /* 1 if channels opened to rejoin */ int sock4; /* socket for server */ int is_away; /* 1 is user is marker as away */ time_t away_time; /* time() when user marking as away */ @@ -214,15 +218,16 @@ extern t_irc_server *server_alloc (); extern void server_destroy (t_irc_server *); extern void server_free (t_irc_server *); extern void server_free_all (); -extern t_irc_server *server_new (char *, int, int, char *, int, char *, char *, - char *, char *, char *, char *, char *, int, - char *, int); +extern t_irc_server *server_new (char *, int, int, int, int, char *, int, char *, + char *, char *, char *, char *, char *, char *, + int, char *, int); extern int server_send (t_irc_server *, char *, int); extern void server_sendf (t_irc_server *, char *, ...); extern void server_recv (t_irc_server *); -extern int server_connect (); +extern int server_connect (t_irc_server *); +extern void server_reconnect (t_irc_server *); extern void server_auto_connect (int); -extern void server_disconnect (t_irc_server *); +extern void server_disconnect (t_irc_server *, int); extern void server_disconnect_all (); extern t_irc_server *server_search (char *); extern int server_get_number_connected (); |