mirror of
https://github.com/weechat/weechat.git
synced 2026-07-02 07:46:38 +02:00
Improved /set command: new colors, server options can be changed while WeeChat is running
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
ChangeLog - 2005-01-04
|
||||
ChangeLog - 2005-01-06
|
||||
|
||||
|
||||
Version 0.1.0 (under dev!):
|
||||
* improved /set command: empty strings are allowed, new colors, server
|
||||
options can be changed while WeeChat is running
|
||||
* added default away/part/quit messages in config file
|
||||
* new [irc] section in config file, option "look_display_away" moved to
|
||||
"irc_display_away"
|
||||
* server messages & errors are all prefixed (by 3 chars, like '-@-')
|
||||
* added new options for charset: look_charset_decode and look_charset_encode
|
||||
* fixed /away command (now ok if not away)
|
||||
* fixed /set command (now empty strings are allowed)
|
||||
|
||||
Version 0.0.9 (2005-01-01):
|
||||
* auto-reconnection to server (new options: server_autoreconnect (on/off),
|
||||
|
||||
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.1.0-cvs\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2005-01-04 23:15+0100\n"
|
||||
"POT-Creation-Date: 2005-01-05 23:47+0100\n"
|
||||
"PO-Revision-Date: 2005-01-01 13:00+0100\n"
|
||||
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -20,7 +20,7 @@ msgstr ""
|
||||
msgid "%s cannot allocate new nick\n"
|
||||
msgstr "%s ompossible d'allouer un nouveau pseudo\n"
|
||||
|
||||
#: src/irc/irc-server.c:136 src/common/weeconfig.c:1286
|
||||
#: src/irc/irc-server.c:136 src/common/weeconfig.c:1397
|
||||
msgid "Unable to get user's name"
|
||||
msgstr "Impossible de déterminer le nom d'utilisateur"
|
||||
|
||||
@@ -1753,51 +1753,51 @@ msgstr ""
|
||||
"%s impossible d'ajouter la fonction pour le message \"%s\" (mémoire "
|
||||
"insuffisante)\n"
|
||||
|
||||
#: src/gui/curses/gui-display.c:574
|
||||
#: src/gui/curses/gui-display.c:572
|
||||
msgid "bytes"
|
||||
msgstr "octets"
|
||||
|
||||
#: src/gui/curses/gui-display.c:574
|
||||
#: src/gui/curses/gui-display.c:572
|
||||
msgid "Kb"
|
||||
msgstr "Ko"
|
||||
|
||||
#: src/gui/curses/gui-display.c:574
|
||||
#: src/gui/curses/gui-display.c:572
|
||||
msgid "Mb"
|
||||
msgstr "Mo"
|
||||
|
||||
#: src/gui/curses/gui-display.c:574
|
||||
#: src/gui/curses/gui-display.c:572
|
||||
msgid "Gb"
|
||||
msgstr "Go"
|
||||
|
||||
#: src/gui/curses/gui-display.c:1008
|
||||
#: src/gui/curses/gui-display.c:1006
|
||||
#, c-format
|
||||
msgid "%d:[not connected] "
|
||||
msgstr "%d:[non connecté] "
|
||||
|
||||
#: src/gui/curses/gui-display.c:1016
|
||||
#: src/gui/curses/gui-display.c:1014
|
||||
msgid "[Act: "
|
||||
msgstr "[Act: "
|
||||
|
||||
#: src/gui/curses/gui-display.c:1055 src/gui/curses/gui-display.c:1058
|
||||
#: src/gui/curses/gui-display.c:1053 src/gui/curses/gui-display.c:1056
|
||||
msgid "-MORE-"
|
||||
msgstr "-PLUS-"
|
||||
|
||||
#: src/gui/curses/gui-display.c:1227
|
||||
#: src/gui/curses/gui-display.c:1225
|
||||
msgid " [A] Accept"
|
||||
msgstr " [A] Accepter"
|
||||
|
||||
#: src/gui/curses/gui-display.c:1228 src/gui/curses/gui-display.c:1234
|
||||
#: src/gui/curses/gui-display.c:1241
|
||||
#: src/gui/curses/gui-display.c:1226 src/gui/curses/gui-display.c:1232
|
||||
#: src/gui/curses/gui-display.c:1239
|
||||
msgid " [C] Cancel"
|
||||
msgstr " [C] Annuler"
|
||||
|
||||
#: src/gui/curses/gui-display.c:1229 src/gui/curses/gui-display.c:1235
|
||||
#: src/gui/curses/gui-display.c:1242 src/gui/curses/gui-display.c:1249
|
||||
#: src/gui/curses/gui-display.c:1254
|
||||
#: src/gui/curses/gui-display.c:1227 src/gui/curses/gui-display.c:1233
|
||||
#: src/gui/curses/gui-display.c:1240 src/gui/curses/gui-display.c:1247
|
||||
#: src/gui/curses/gui-display.c:1252
|
||||
msgid " [Q] Close DCC view"
|
||||
msgstr " [Q] Fermer la vue DCC"
|
||||
|
||||
#: src/gui/curses/gui-display.c:1248
|
||||
#: src/gui/curses/gui-display.c:1246
|
||||
msgid " [R] Remove"
|
||||
msgstr " [R] Retirer"
|
||||
|
||||
@@ -2177,6 +2177,7 @@ msgid "%s already connected to server \"%s\"!\n"
|
||||
msgstr "%s déjà connecté au serveur \"%s\" !\n"
|
||||
|
||||
#: src/common/command.c:1090 src/common/command.c:1128
|
||||
#: src/common/command.c:1704
|
||||
#, c-format
|
||||
msgid "%s server \"%s\" not found\n"
|
||||
msgstr "%s serveur \"%s\" non trouvé\n"
|
||||
@@ -2250,7 +2251,7 @@ msgstr " Commande /%s => Perl(%s)\n"
|
||||
msgid "Perl scripts unloaded\n"
|
||||
msgstr "Scripts Perl déchargés\n"
|
||||
|
||||
#: src/common/command.c:1325 src/common/command.c:1789
|
||||
#: src/common/command.c:1325 src/common/command.c:1917
|
||||
#, c-format
|
||||
msgid "%s unknown option for \"%s\" command\n"
|
||||
msgstr "%s option inconnue pour la commande \"%s\"\n"
|
||||
@@ -2331,50 +2332,53 @@ msgstr "cr
|
||||
msgid "%s unable to create server\n"
|
||||
msgstr "%s impossible de créer le serveur\n"
|
||||
|
||||
#: src/common/command.c:1629
|
||||
#, c-format
|
||||
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
|
||||
msgstr "%s l'option \"%s\" ne peut pas être changée lorsque WeeChat tourne\n"
|
||||
#: src/common/command.c:1633
|
||||
msgid "(unknown)"
|
||||
msgstr "(inconnu)"
|
||||
|
||||
#: src/common/command.c:1641
|
||||
#, c-format
|
||||
msgid "%s incorrect value for option \"%s\"\n"
|
||||
msgstr "%s valeur incorrecte pour l'option \"%s\"\n"
|
||||
#: src/common/command.c:1656
|
||||
msgid "(password hidden) "
|
||||
msgstr "(mot de passe caché)"
|
||||
|
||||
#: src/common/command.c:1647
|
||||
#: src/common/command.c:1732 src/common/command.c:1772
|
||||
#, c-format
|
||||
msgid "%s config option \"%s\" not found\n"
|
||||
msgstr "%s option de configuration \"%s\" non trouvée\n"
|
||||
|
||||
#: src/common/command.c:1697
|
||||
msgid "(unknown)"
|
||||
msgstr "(inconnu)"
|
||||
#: src/common/command.c:1736 src/common/command.c:1766
|
||||
#, c-format
|
||||
msgid "%s incorrect value for option \"%s\"\n"
|
||||
msgstr "%s valeur incorrecte pour l'option \"%s\"\n"
|
||||
|
||||
#: src/common/command.c:1717
|
||||
#: src/common/command.c:1751
|
||||
#, c-format
|
||||
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
|
||||
msgstr "%s l'option \"%s\" ne peut pas être changée lorsque WeeChat tourne\n"
|
||||
|
||||
#: src/common/command.c:1845
|
||||
#, c-format
|
||||
msgid "No config option found with \"%s\"\n"
|
||||
msgstr "Aucune option de configuration trouvée avec \"%s\"\n"
|
||||
|
||||
#: src/common/command.c:1720
|
||||
#: src/common/command.c:1848
|
||||
msgid "No config option found\n"
|
||||
msgstr "Aucune option de configuration trouvée\n"
|
||||
|
||||
#: src/common/command.c:1725
|
||||
#: src/common/command.c:1854
|
||||
#, c-format
|
||||
msgid "%d config option(s) found with \"%s\"\n"
|
||||
msgstr "%d option(s) de configuration trouvées avec \"%s\"\n"
|
||||
msgid "config option(s) found with \"%s\"\n"
|
||||
msgstr "option(s) de configuration trouvée(s) avec \"%s\"\n"
|
||||
|
||||
#: src/common/command.c:1728
|
||||
#, c-format
|
||||
msgid "%d config option(s) found\n"
|
||||
msgstr "%d option(s) de configuration trouvées\n"
|
||||
#: src/common/command.c:1857
|
||||
msgid "config option(s) found\n"
|
||||
msgstr "option(s) de configuration trouvée(s)\n"
|
||||
|
||||
#: src/common/command.c:1748
|
||||
#: src/common/command.c:1876
|
||||
#, c-format
|
||||
msgid "%s alias or command \"%s\" not found\n"
|
||||
msgstr "%s alias ou commande \"%s\" non trouvé\n"
|
||||
|
||||
#: src/common/command.c:1757
|
||||
#: src/common/command.c:1885
|
||||
#, c-format
|
||||
msgid "Alias \"%s\" removed\n"
|
||||
msgstr "Alias \"%s\" supprimé\n"
|
||||
@@ -3215,57 +3219,57 @@ msgstr ""
|
||||
msgid "automatically rejoin channels when kicked"
|
||||
msgstr "rejoindre automatiquement les canaux quand mis dehors"
|
||||
|
||||
#: src/common/weeconfig.c:846
|
||||
#: src/common/weeconfig.c:957
|
||||
#, 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:855
|
||||
#: src/common/weeconfig.c:966
|
||||
#, 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:869
|
||||
#: src/common/weeconfig.c:980
|
||||
#, 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:908
|
||||
#: src/common/weeconfig.c:1019
|
||||
#, 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:919
|
||||
#: src/common/weeconfig.c:1030
|
||||
#, 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:958
|
||||
#: src/common/weeconfig.c:1069
|
||||
#, c-format
|
||||
msgid "%s config file \"%s\" not found.\n"
|
||||
msgstr "%s fichier de configuration \"%s\" non trouvé.\n"
|
||||
|
||||
#: src/common/weeconfig.c:990
|
||||
#: src/common/weeconfig.c:1101
|
||||
#, 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:1007
|
||||
#: src/common/weeconfig.c:1118
|
||||
#, 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:1025
|
||||
#: src/common/weeconfig.c:1136
|
||||
#, 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:1059
|
||||
#: src/common/weeconfig.c:1170
|
||||
#, c-format
|
||||
msgid "%s %s, line %d: invalid option \"%s\"\n"
|
||||
msgstr "%s %s, ligne %d: option \"%s\" invalide\n"
|
||||
|
||||
#: src/common/weeconfig.c:1070
|
||||
#: src/common/weeconfig.c:1181
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s %s, line %d: invalid value foroption '%s'\n"
|
||||
@@ -3274,7 +3278,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:1079
|
||||
#: src/common/weeconfig.c:1190
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s %s, line %d: invalid value for option '%s'\n"
|
||||
@@ -3283,7 +3287,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:1090
|
||||
#: src/common/weeconfig.c:1201
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s %s, line %d: invalid value for option '%s'\n"
|
||||
@@ -3292,26 +3296,26 @@ msgstr ""
|
||||
"%s %s, ligne %d: valeur invalide pour l'option '%s'\n"
|
||||
"Attendu: une de ces chaînes: "
|
||||
|
||||
#: src/common/weeconfig.c:1106
|
||||
#: src/common/weeconfig.c:1217
|
||||
#, 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:1165 src/common/weeconfig.c:1338
|
||||
#: src/common/weeconfig.c:1276 src/common/weeconfig.c:1449
|
||||
#, c-format
|
||||
msgid "%s cannot create file \"%s\"\n"
|
||||
msgstr "%s impossible de créer le fichier \"%s\"\n"
|
||||
|
||||
#: src/common/weeconfig.c:1171
|
||||
#: src/common/weeconfig.c:1282
|
||||
#, 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:1172
|
||||
#: src/common/weeconfig.c:1283
|
||||
msgid "creating default config file\n"
|
||||
msgstr "création du fichier de configuration par défaut\n"
|
||||
|
||||
#: src/common/weeconfig.c:1175 src/common/weeconfig.c:1347
|
||||
#: src/common/weeconfig.c:1286 src/common/weeconfig.c:1458
|
||||
#, c-format
|
||||
msgid ""
|
||||
"#\n"
|
||||
@@ -3320,6 +3324,6 @@ msgstr ""
|
||||
"#\n"
|
||||
"# %s: fichier de configuration, créé par %s v%s le %s#\n"
|
||||
|
||||
#: src/common/weeconfig.c:1344
|
||||
#: src/common/weeconfig.c:1455
|
||||
msgid "saving config to disk\n"
|
||||
msgstr "sauvegarde de la configuration sur disque\n"
|
||||
|
||||
+58
-54
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2005-01-04 23:15+0100\n"
|
||||
"POT-Creation-Date: 2005-01-05 23:47+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,7 +20,7 @@ msgstr ""
|
||||
msgid "%s cannot allocate new nick\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/irc/irc-server.c:136 src/common/weeconfig.c:1286
|
||||
#: src/irc/irc-server.c:136 src/common/weeconfig.c:1397
|
||||
msgid "Unable to get user's name"
|
||||
msgstr ""
|
||||
|
||||
@@ -1641,51 +1641,51 @@ msgstr ""
|
||||
msgid "%s unable to add handler for \"%s\" message (not enough memory)\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/curses/gui-display.c:574
|
||||
#: src/gui/curses/gui-display.c:572
|
||||
msgid "bytes"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/curses/gui-display.c:574
|
||||
#: src/gui/curses/gui-display.c:572
|
||||
msgid "Kb"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/curses/gui-display.c:574
|
||||
#: src/gui/curses/gui-display.c:572
|
||||
msgid "Mb"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/curses/gui-display.c:574
|
||||
#: src/gui/curses/gui-display.c:572
|
||||
msgid "Gb"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/curses/gui-display.c:1008
|
||||
#: src/gui/curses/gui-display.c:1006
|
||||
#, c-format
|
||||
msgid "%d:[not connected] "
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/curses/gui-display.c:1016
|
||||
#: src/gui/curses/gui-display.c:1014
|
||||
msgid "[Act: "
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/curses/gui-display.c:1055 src/gui/curses/gui-display.c:1058
|
||||
#: src/gui/curses/gui-display.c:1053 src/gui/curses/gui-display.c:1056
|
||||
msgid "-MORE-"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/curses/gui-display.c:1227
|
||||
#: src/gui/curses/gui-display.c:1225
|
||||
msgid " [A] Accept"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/curses/gui-display.c:1228 src/gui/curses/gui-display.c:1234
|
||||
#: src/gui/curses/gui-display.c:1241
|
||||
#: src/gui/curses/gui-display.c:1226 src/gui/curses/gui-display.c:1232
|
||||
#: src/gui/curses/gui-display.c:1239
|
||||
msgid " [C] Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/curses/gui-display.c:1229 src/gui/curses/gui-display.c:1235
|
||||
#: src/gui/curses/gui-display.c:1242 src/gui/curses/gui-display.c:1249
|
||||
#: src/gui/curses/gui-display.c:1254
|
||||
#: src/gui/curses/gui-display.c:1227 src/gui/curses/gui-display.c:1233
|
||||
#: src/gui/curses/gui-display.c:1240 src/gui/curses/gui-display.c:1247
|
||||
#: src/gui/curses/gui-display.c:1252
|
||||
msgid " [Q] Close DCC view"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/curses/gui-display.c:1248
|
||||
#: src/gui/curses/gui-display.c:1246
|
||||
msgid " [R] Remove"
|
||||
msgstr ""
|
||||
|
||||
@@ -2020,6 +2020,7 @@ msgid "%s already connected to server \"%s\"!\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1090 src/common/command.c:1128
|
||||
#: src/common/command.c:1704
|
||||
#, c-format
|
||||
msgid "%s server \"%s\" not found\n"
|
||||
msgstr ""
|
||||
@@ -2093,7 +2094,7 @@ msgstr ""
|
||||
msgid "Perl scripts unloaded\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1325 src/common/command.c:1789
|
||||
#: src/common/command.c:1325 src/common/command.c:1917
|
||||
#, c-format
|
||||
msgid "%s unknown option for \"%s\" command\n"
|
||||
msgstr ""
|
||||
@@ -2171,50 +2172,53 @@ msgstr ""
|
||||
msgid "%s unable to create server\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1629
|
||||
#, c-format
|
||||
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
|
||||
#: src/common/command.c:1633
|
||||
msgid "(unknown)"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1641
|
||||
#, c-format
|
||||
msgid "%s incorrect value for option \"%s\"\n"
|
||||
#: src/common/command.c:1656
|
||||
msgid "(password hidden) "
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1647
|
||||
#: src/common/command.c:1732 src/common/command.c:1772
|
||||
#, c-format
|
||||
msgid "%s config option \"%s\" not found\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1697
|
||||
msgid "(unknown)"
|
||||
#: src/common/command.c:1736 src/common/command.c:1766
|
||||
#, c-format
|
||||
msgid "%s incorrect value for option \"%s\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1717
|
||||
#: src/common/command.c:1751
|
||||
#, c-format
|
||||
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1845
|
||||
#, c-format
|
||||
msgid "No config option found with \"%s\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1720
|
||||
#: src/common/command.c:1848
|
||||
msgid "No config option found\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1725
|
||||
#: src/common/command.c:1854
|
||||
#, c-format
|
||||
msgid "%d config option(s) found with \"%s\"\n"
|
||||
msgid "config option(s) found with \"%s\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1728
|
||||
#, c-format
|
||||
msgid "%d config option(s) found\n"
|
||||
#: src/common/command.c:1857
|
||||
msgid "config option(s) found\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1748
|
||||
#: src/common/command.c:1876
|
||||
#, c-format
|
||||
msgid "%s alias or command \"%s\" not found\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1757
|
||||
#: src/common/command.c:1885
|
||||
#, c-format
|
||||
msgid "Alias \"%s\" removed\n"
|
||||
msgstr ""
|
||||
@@ -3003,103 +3007,103 @@ msgstr ""
|
||||
msgid "automatically rejoin channels when kicked"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:846
|
||||
#: src/common/weeconfig.c:957
|
||||
#, c-format
|
||||
msgid "%s %s, line %d: new server, but previous was incomplete\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:855
|
||||
#: src/common/weeconfig.c:966
|
||||
#, c-format
|
||||
msgid "%s %s, line %d: server '%s' already exists\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:869
|
||||
#: src/common/weeconfig.c:980
|
||||
#, c-format
|
||||
msgid "%s %s, line %d: unable to create server\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:908
|
||||
#: src/common/weeconfig.c:1019
|
||||
#, c-format
|
||||
msgid "%s unable to assign default int with string (\"%s\")\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:919
|
||||
#: src/common/weeconfig.c:1030
|
||||
#, c-format
|
||||
msgid "%s unable to assign default color (\"%s\")\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:958
|
||||
#: src/common/weeconfig.c:1069
|
||||
#, c-format
|
||||
msgid "%s config file \"%s\" not found.\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:990
|
||||
#: src/common/weeconfig.c:1101
|
||||
#, c-format
|
||||
msgid "%s %s, line %d: invalid syntax, missing \"]\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:1007
|
||||
#: src/common/weeconfig.c:1118
|
||||
#, c-format
|
||||
msgid "%s %s, line %d: unknown section identifier (\"%s\")\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:1025
|
||||
#: src/common/weeconfig.c:1136
|
||||
#, c-format
|
||||
msgid "%s %s, line %d: invalid syntax, missing \"=\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:1059
|
||||
#: src/common/weeconfig.c:1170
|
||||
#, c-format
|
||||
msgid "%s %s, line %d: invalid option \"%s\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:1070
|
||||
#: src/common/weeconfig.c:1181
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s %s, line %d: invalid value foroption '%s'\n"
|
||||
"Expected: boolean value: 'off' or 'on'\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:1079
|
||||
#: src/common/weeconfig.c:1190
|
||||
#, 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:1090
|
||||
#: src/common/weeconfig.c:1201
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s %s, line %d: invalid value for option '%s'\n"
|
||||
"Expected: one of these strings: "
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:1106
|
||||
#: src/common/weeconfig.c:1217
|
||||
#, c-format
|
||||
msgid "%s %s, line %d: invalid color name for option '%s'\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:1165 src/common/weeconfig.c:1338
|
||||
#: src/common/weeconfig.c:1276 src/common/weeconfig.c:1449
|
||||
#, c-format
|
||||
msgid "%s cannot create file \"%s\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:1171
|
||||
#: src/common/weeconfig.c:1282
|
||||
#, c-format
|
||||
msgid "%s: creating default config file...\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:1172
|
||||
#: src/common/weeconfig.c:1283
|
||||
msgid "creating default config file\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:1175 src/common/weeconfig.c:1347
|
||||
#: src/common/weeconfig.c:1286 src/common/weeconfig.c:1458
|
||||
#, c-format
|
||||
msgid ""
|
||||
"#\n"
|
||||
"# %s configuration file, created by %s v%s on %s#\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:1344
|
||||
#: src/common/weeconfig.c:1455
|
||||
msgid "saving config to disk\n"
|
||||
msgstr ""
|
||||
|
||||
+189
-60
@@ -1592,6 +1592,77 @@ weechat_cmd_server (int argc, char **argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_set_cmd_display_option: display config option
|
||||
*/
|
||||
|
||||
void
|
||||
weechat_set_cmd_display_option (t_config_option *option, char *prefix, void *value)
|
||||
{
|
||||
char *color_name, *pos_nickserv, *pos_pwd, *value2;
|
||||
|
||||
gui_printf (NULL, " %s%s%s",
|
||||
(prefix) ? prefix : "",
|
||||
(prefix) ? "." : "",
|
||||
option->option_name);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, " = ");
|
||||
if (!value)
|
||||
{
|
||||
if (option->option_type == OPTION_TYPE_STRING)
|
||||
value = option->ptr_string;
|
||||
else
|
||||
value = option->ptr_int;
|
||||
}
|
||||
switch (option->option_type)
|
||||
{
|
||||
case OPTION_TYPE_BOOLEAN:
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_HOST,
|
||||
"%s\n", (*((int *)value)) ? "ON" : "OFF");
|
||||
break;
|
||||
case OPTION_TYPE_INT:
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_HOST,
|
||||
"%d\n", *((int *)value));
|
||||
break;
|
||||
case OPTION_TYPE_INT_WITH_STRING:
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_HOST,
|
||||
"%s\n", option->array_values[*((int *)value)]);
|
||||
break;
|
||||
case OPTION_TYPE_COLOR:
|
||||
color_name = gui_get_color_by_value (*((int *)value));
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_HOST,
|
||||
"%s\n", (color_name) ? color_name : _("(unknown)"));
|
||||
break;
|
||||
case OPTION_TYPE_STRING:
|
||||
if (*((char **)value))
|
||||
{
|
||||
value2 = strdup (*((char **)value));
|
||||
pos_nickserv = NULL;
|
||||
pos_pwd = NULL;
|
||||
pos_nickserv = strstr (value2, "nickserv");
|
||||
if (pos_nickserv)
|
||||
{
|
||||
pos_pwd = strstr (value2, "identify ");
|
||||
if (!pos_pwd)
|
||||
pos_pwd = strstr (value2, "register ");
|
||||
}
|
||||
if (cfg_log_hide_nickserv_pwd && pos_nickserv && pos_pwd)
|
||||
{
|
||||
pos_pwd += 9;
|
||||
while (pos_pwd[0])
|
||||
{
|
||||
pos_pwd[0] = '*';
|
||||
pos_pwd++;
|
||||
}
|
||||
gui_printf (NULL, _("(password hidden) "));
|
||||
}
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_HOST, "%s", value2);
|
||||
free (value2);
|
||||
}
|
||||
gui_printf (NULL, "\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_cmd_set: set options
|
||||
*/
|
||||
@@ -1599,10 +1670,12 @@ weechat_cmd_server (int argc, char **argv)
|
||||
int
|
||||
weechat_cmd_set (char *arguments)
|
||||
{
|
||||
char *option, *value;
|
||||
char *option, *value, *pos;
|
||||
int i, j, section_displayed;
|
||||
char *color_name;
|
||||
t_config_option *ptr_option;
|
||||
t_irc_server *ptr_server;
|
||||
char option_name[256];
|
||||
void *ptr_option_value;
|
||||
int number_found;
|
||||
|
||||
option = NULL;
|
||||
@@ -1620,32 +1693,86 @@ weechat_cmd_set (char *arguments)
|
||||
|
||||
if (value)
|
||||
{
|
||||
ptr_option = config_option_search (option);
|
||||
if (ptr_option)
|
||||
pos = strchr (option, '.');
|
||||
if (pos)
|
||||
{
|
||||
if (ptr_option->handler_change == NULL)
|
||||
{
|
||||
/* server config option modification */
|
||||
pos[0] = '\0';
|
||||
ptr_server = server_search (option);
|
||||
if (!ptr_server)
|
||||
gui_printf (NULL,
|
||||
_("%s option \"%s\" can not be changed while WeeChat is running\n"),
|
||||
_("%s server \"%s\" not found\n"),
|
||||
WEECHAT_ERROR, option);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (config_option_set_value (ptr_option, value) == 0)
|
||||
switch (config_set_server_value (ptr_server, pos + 1, value))
|
||||
{
|
||||
(void) (ptr_option->handler_change());
|
||||
gui_printf (NULL, "[%s]\n", config_get_section (ptr_option));
|
||||
gui_printf (NULL, " %s = %s\n", option, value);
|
||||
case 0:
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "[");
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, "%s",
|
||||
config_sections[CONFIG_SECTION_SERVER].section_name);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_NICK, " %s",
|
||||
ptr_server->name);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "]\n");
|
||||
for (i = 0; weechat_options[CONFIG_SECTION_SERVER][i].option_name; i++)
|
||||
{
|
||||
if (strcmp (weechat_options[CONFIG_SECTION_SERVER][i].option_name, pos + 1) == 0)
|
||||
break;
|
||||
}
|
||||
if (weechat_options[CONFIG_SECTION_SERVER][i].option_name)
|
||||
{
|
||||
ptr_option_value = config_get_server_option_ptr (ptr_server,
|
||||
weechat_options[CONFIG_SECTION_SERVER][i].option_name);
|
||||
weechat_set_cmd_display_option (&weechat_options[CONFIG_SECTION_SERVER][i],
|
||||
ptr_server->name,
|
||||
ptr_option_value);
|
||||
}
|
||||
config_change_buffer_content ();
|
||||
break;
|
||||
case -1:
|
||||
gui_printf (NULL, _("%s config option \"%s\" not found\n"),
|
||||
WEECHAT_ERROR, pos + 1);
|
||||
break;
|
||||
case -2:
|
||||
gui_printf (NULL, _("%s incorrect value for option \"%s\"\n"),
|
||||
WEECHAT_ERROR, pos + 1);
|
||||
break;
|
||||
}
|
||||
else
|
||||
gui_printf (NULL, _("%s incorrect value for option \"%s\"\n"),
|
||||
WEECHAT_ERROR, option);
|
||||
}
|
||||
pos[0] = '.';
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_printf (NULL, _("%s config option \"%s\" not found\n"),
|
||||
WEECHAT_ERROR, option);
|
||||
ptr_option = config_option_search (option);
|
||||
if (ptr_option)
|
||||
{
|
||||
if (ptr_option->handler_change == NULL)
|
||||
{
|
||||
gui_printf (NULL,
|
||||
_("%s option \"%s\" can not be changed while WeeChat is running\n"),
|
||||
WEECHAT_ERROR, option);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (config_option_set_value (ptr_option, value) == 0)
|
||||
{
|
||||
(void) (ptr_option->handler_change());
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "[");
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL,
|
||||
"%s", config_get_section (ptr_option));
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "]\n");
|
||||
weechat_set_cmd_display_option (ptr_option, NULL, NULL);
|
||||
}
|
||||
else
|
||||
gui_printf (NULL, _("%s incorrect value for option \"%s\"\n"),
|
||||
WEECHAT_ERROR, option);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_printf (NULL, _("%s config option \"%s\" not found\n"),
|
||||
WEECHAT_ERROR, option);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1665,47 +1792,49 @@ weechat_cmd_set (char *arguments)
|
||||
{
|
||||
if (!section_displayed)
|
||||
{
|
||||
gui_printf (NULL, "[%s]\n",
|
||||
config_sections[i].section_name);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "[");
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL,
|
||||
"%s",
|
||||
config_sections[i].section_name);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "]\n");
|
||||
section_displayed = 1;
|
||||
}
|
||||
switch (weechat_options[i][j].option_type)
|
||||
{
|
||||
case OPTION_TYPE_BOOLEAN:
|
||||
gui_printf (NULL, " %s = %s\n",
|
||||
weechat_options[i][j].option_name,
|
||||
(*weechat_options[i][j].ptr_int) ?
|
||||
"ON" : "OFF");
|
||||
break;
|
||||
case OPTION_TYPE_INT:
|
||||
gui_printf (NULL,
|
||||
" %s = %d\n",
|
||||
weechat_options[i][j].option_name,
|
||||
*weechat_options[i][j].ptr_int);
|
||||
break;
|
||||
case OPTION_TYPE_INT_WITH_STRING:
|
||||
gui_printf (NULL,
|
||||
" %s = %s\n",
|
||||
weechat_options[i][j].option_name,
|
||||
weechat_options[i][j].array_values[*weechat_options[i][j].ptr_int]);
|
||||
break;
|
||||
case OPTION_TYPE_COLOR:
|
||||
color_name = gui_get_color_by_value (*weechat_options[i][j].ptr_int);
|
||||
gui_printf (NULL,
|
||||
" %s = %s\n",
|
||||
weechat_options[i][j].option_name,
|
||||
(color_name) ? color_name : _("(unknown)"));
|
||||
break;
|
||||
case OPTION_TYPE_STRING:
|
||||
gui_printf (NULL, " %s = %s\n",
|
||||
weechat_options[i][j].
|
||||
option_name,
|
||||
(*weechat_options[i][j].
|
||||
ptr_string) ?
|
||||
*weechat_options[i][j].
|
||||
ptr_string : "");
|
||||
break;
|
||||
}
|
||||
weechat_set_cmd_display_option (&weechat_options[i][j], NULL, NULL);
|
||||
number_found++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (ptr_server = irc_servers; ptr_server;
|
||||
ptr_server = ptr_server->next_server)
|
||||
{
|
||||
section_displayed = 0;
|
||||
for (i = 0; weechat_options[CONFIG_SECTION_SERVER][i].option_name; i++)
|
||||
{
|
||||
snprintf (option_name, sizeof (option_name), "%s.%s",
|
||||
ptr_server->name,
|
||||
weechat_options[CONFIG_SECTION_SERVER][i].option_name);
|
||||
if ((!option) ||
|
||||
((option) && (option[0])
|
||||
&& (strstr (option_name, option) != NULL)))
|
||||
{
|
||||
if (!section_displayed)
|
||||
{
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "[");
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, "%s",
|
||||
config_sections[CONFIG_SECTION_SERVER].section_name);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_NICK, " %s",
|
||||
ptr_server->name);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "]\n");
|
||||
section_displayed = 1;
|
||||
}
|
||||
ptr_option_value = config_get_server_option_ptr (ptr_server,
|
||||
weechat_options[CONFIG_SECTION_SERVER][i].option_name);
|
||||
if (ptr_option_value)
|
||||
{
|
||||
weechat_set_cmd_display_option (&weechat_options[CONFIG_SECTION_SERVER][i],
|
||||
ptr_server->name,
|
||||
ptr_option_value);
|
||||
number_found++;
|
||||
}
|
||||
}
|
||||
@@ -1721,12 +1850,12 @@ weechat_cmd_set (char *arguments)
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, "%d ", number_found);
|
||||
if (option)
|
||||
gui_printf (NULL, _("%d config option(s) found with \"%s\"\n"),
|
||||
number_found, option);
|
||||
gui_printf (NULL, _("config option(s) found with \"%s\"\n"),
|
||||
option);
|
||||
else
|
||||
gui_printf (NULL, _("%d config option(s) found\n"),
|
||||
number_found);
|
||||
gui_printf (NULL, _("config option(s) found\n"));
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
#define WEECHAT_COPYRIGHT PACKAGE_NAME " (c) 2003-2005 by Wee Team"
|
||||
#define WEECHAT_COPYRIGHT_DATE "(c) 2003-2005"
|
||||
#define WEECHAT_WEBSITE "http://weechat.flashtux.org"
|
||||
|
||||
#define WEECHAT_ERROR _(PACKAGE_NAME " Error:")
|
||||
@@ -57,10 +57,7 @@
|
||||
|
||||
#define WEE_LICENSE \
|
||||
PACKAGE_STRING " (c) Copyright 2003-2005, compiled on " __DATE__ " " __TIME__ \
|
||||
"\nDeveloped by FlashCode <flashcode@flashtux.org>\n" \
|
||||
" Bounga <bounga@altern.org>\n" \
|
||||
" Xahlexx <xahlexx@weeland.org>\n" \
|
||||
"Website: " WEECHAT_WEBSITE "\n\n" \
|
||||
"\nDeveloped by FlashCode <flashcode@flashtux.org> - " WEECHAT_WEBSITE "\n\n" \
|
||||
"This program is free software; you can redistribute it and/or modify\n" \
|
||||
"it under the terms of the GNU General Public License as published by\n" \
|
||||
"the Free Software Foundation; either version 2 of the License, or\n" \
|
||||
@@ -78,7 +75,7 @@
|
||||
|
||||
#define WEE_USAGE1 \
|
||||
PACKAGE_STRING " (c) Copyright 2003-2005, compiled on " __DATE__ " " __TIME__ \
|
||||
"\nDeveloped by FlashCode, Bounga and Xahlexx - " WEECHAT_WEBSITE "\n\n" \
|
||||
"\nDeveloped by FlashCode <flashcode@flashtux.org> - " WEECHAT_WEBSITE "\n\n" \
|
||||
"Usage: %s [options ...]\n" \
|
||||
" or: %s [irc://[nickname[:password]@]irc.example.org[:port][/channel] ...]\n\n"
|
||||
|
||||
|
||||
+120
-9
@@ -409,11 +409,11 @@ t_config_option weechat_options_history[] =
|
||||
N_("maximum number of lines in history "
|
||||
"for one server/channel/private window (0 = unlimited)"),
|
||||
OPTION_TYPE_INT, 0, INT_MAX, 4096,
|
||||
NULL, NULL, &cfg_history_max_lines, NULL, NULL },
|
||||
NULL, NULL, &cfg_history_max_lines, NULL, config_change_noop },
|
||||
{ "history_max_commands", N_("max user commands in history"),
|
||||
N_("maximum number of user commands in history (0 = unlimited)"),
|
||||
OPTION_TYPE_INT, 0, INT_MAX, 100,
|
||||
NULL, NULL, &cfg_history_max_commands, NULL, NULL },
|
||||
NULL, NULL, &cfg_history_max_commands, NULL, config_change_noop },
|
||||
{ NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -442,15 +442,15 @@ t_config_option weechat_options_log[] =
|
||||
{ "log_path", N_("path for log files"),
|
||||
N_("path for WeeChat log files"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"~/.weechat/logs/", NULL, NULL, &cfg_log_path, NULL },
|
||||
"~/.weechat/logs/", NULL, NULL, &cfg_log_path, config_change_noop },
|
||||
{ "log_timestamp", N_("timestamp for log"),
|
||||
N_("timestamp for log (see man strftime for date/time specifiers)"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"%Y %b %d %H:%M:%S", NULL, NULL, &cfg_log_timestamp, NULL },
|
||||
"%Y %b %d %H:%M:%S", NULL, NULL, &cfg_log_timestamp, config_change_noop },
|
||||
{ "log_hide_nickserv_pwd", N_("hide password displayed by nickserv"),
|
||||
N_("hide password displayed by nickserv"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
NULL, NULL, &cfg_log_hide_nickserv_pwd, NULL, NULL },
|
||||
NULL, NULL, &cfg_log_hide_nickserv_pwd, NULL, config_change_noop },
|
||||
{ NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -539,19 +539,19 @@ t_config_option weechat_options_proxy[] =
|
||||
{ { "proxy_use", N_("use proxy"),
|
||||
N_("use a proxy server to connect to irc server"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_FALSE,
|
||||
NULL, NULL, &cfg_proxy_use, NULL, NULL },
|
||||
NULL, NULL, &cfg_proxy_use, NULL, config_change_noop },
|
||||
{ "proxy_address", N_("proxy address"),
|
||||
N_("proxy server address (IP or hostname)"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"", NULL, NULL, &cfg_proxy_address, NULL },
|
||||
"", NULL, NULL, &cfg_proxy_address, config_change_noop },
|
||||
{ "proxy_port", N_("port for proxy"),
|
||||
N_("port for connecting to proxy server"),
|
||||
OPTION_TYPE_INT, 0, 65535, 1080,
|
||||
NULL, NULL, &cfg_proxy_port, NULL, NULL },
|
||||
NULL, NULL, &cfg_proxy_port, NULL, config_change_noop },
|
||||
{ "proxy_password", N_("proxy password"),
|
||||
N_("password for proxy server"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"", NULL, NULL, &cfg_proxy_password, NULL },
|
||||
"", NULL, NULL, &cfg_proxy_password, config_change_noop },
|
||||
{ NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -780,6 +780,117 @@ config_option_set_value (t_config_option *option, char *value)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* config_get_server_option_ptr: get a pointer to a server config option
|
||||
*/
|
||||
|
||||
void *
|
||||
config_get_server_option_ptr (t_irc_server *server, char *option_name)
|
||||
{
|
||||
if (strcasecmp (option_name, "server_name") == 0)
|
||||
return (void *)(&server->name);
|
||||
if (strcasecmp (option_name, "server_autoconnect") == 0)
|
||||
return (void *)(&server->autoconnect);
|
||||
if (strcasecmp (option_name, "server_autoreconnect") == 0)
|
||||
return (void *)(&server->autoreconnect);
|
||||
if (strcasecmp (option_name, "server_autoreconnect_delay") == 0)
|
||||
return (void *)(&server->autoreconnect_delay);
|
||||
if (strcasecmp (option_name, "server_address") == 0)
|
||||
return (void *)(&server->address);
|
||||
if (strcasecmp (option_name, "server_port") == 0)
|
||||
return (void *)(&server->port);
|
||||
if (strcasecmp (option_name, "server_password") == 0)
|
||||
return (void *)(&server->password);
|
||||
if (strcasecmp (option_name, "server_nick1") == 0)
|
||||
return (void *)(&server->nick1);
|
||||
if (strcasecmp (option_name, "server_nick2") == 0)
|
||||
return (void *)(&server->nick2);
|
||||
if (strcasecmp (option_name, "server_nick3") == 0)
|
||||
return (void *)(&server->nick3);
|
||||
if (strcasecmp (option_name, "server_username") == 0)
|
||||
return (void *)(&server->username);
|
||||
if (strcasecmp (option_name, "server_realname") == 0)
|
||||
return (void *)(&server->realname);
|
||||
if (strcasecmp (option_name, "server_command") == 0)
|
||||
return (void *)(&server->command);
|
||||
if (strcasecmp (option_name, "server_command_delay") == 0)
|
||||
return (void *)(&server->command_delay);
|
||||
if (strcasecmp (option_name, "server_autojoin") == 0)
|
||||
return (void *)(&server->autojoin);
|
||||
if (strcasecmp (option_name, "server_autorejoin") == 0)
|
||||
return (void *)(&server->autorejoin);
|
||||
/* option not found */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* config_set_server_value: set new value for an option
|
||||
* return: 0 if success
|
||||
* -1 if option not found
|
||||
* -2 if bad value
|
||||
*/
|
||||
|
||||
int
|
||||
config_set_server_value (t_irc_server *server, char *option_name,
|
||||
char *value)
|
||||
{
|
||||
t_config_option *ptr_option;
|
||||
int i;
|
||||
void *ptr_data;
|
||||
int int_value;
|
||||
|
||||
ptr_data = config_get_server_option_ptr (server, option_name);
|
||||
if (!ptr_data)
|
||||
return -1;
|
||||
|
||||
ptr_option = NULL;
|
||||
for (i = 0; weechat_options[CONFIG_SECTION_SERVER][i].option_name; i++)
|
||||
{
|
||||
/* if option found, return pointer */
|
||||
if (strcasecmp (weechat_options[CONFIG_SECTION_SERVER][i].option_name, option_name) == 0)
|
||||
{
|
||||
ptr_option = &weechat_options[CONFIG_SECTION_SERVER][i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!ptr_option)
|
||||
return -1;
|
||||
|
||||
switch (ptr_option->option_type)
|
||||
{
|
||||
case OPTION_TYPE_BOOLEAN:
|
||||
if (strcasecmp (value, "on") == 0)
|
||||
*((int *)(ptr_data)) = BOOL_TRUE;
|
||||
else if (strcasecmp (value, "off") == 0)
|
||||
*((int *)(ptr_data)) = BOOL_FALSE;
|
||||
else
|
||||
return -2;
|
||||
break;
|
||||
case OPTION_TYPE_INT:
|
||||
int_value = atoi (value);
|
||||
if ((int_value < ptr_option->min) || (int_value > ptr_option->max))
|
||||
return -2;
|
||||
*((int *)(ptr_data)) = int_value;
|
||||
break;
|
||||
case OPTION_TYPE_INT_WITH_STRING:
|
||||
int_value = get_pos_array_values (ptr_option->array_values, value);
|
||||
if (int_value < 0)
|
||||
return -2;
|
||||
*((int *)(ptr_data)) = int_value;
|
||||
break;
|
||||
case OPTION_TYPE_COLOR:
|
||||
if (!gui_assign_color ((int *)ptr_data, value))
|
||||
return -2;
|
||||
break;
|
||||
case OPTION_TYPE_STRING:
|
||||
if (*((char **)ptr_data))
|
||||
free (*((char **)ptr_data));
|
||||
*((char **)ptr_data) = strdup (value);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* config_option_search: look for an option and return pointer to this option
|
||||
* if option is not found, NULL is returned
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#ifndef __WEECHAT_CONFIG_H
|
||||
#define __WEECHAT_CONFIG_H 1
|
||||
|
||||
#include "../irc/irc.h"
|
||||
|
||||
#define WEECHAT_CONFIG_NAME "weechat.rc"
|
||||
|
||||
#define CONFIG_SECTION_NONE -1
|
||||
@@ -179,6 +181,8 @@ extern void config_change_color ();
|
||||
extern int config_option_set_value (t_config_option *, char *);
|
||||
extern t_config_option *config_option_search (char *);
|
||||
extern int config_set_value (char *, char *);
|
||||
extern void *config_get_server_option_ptr (t_irc_server *, char *);
|
||||
extern int config_set_server_value (t_irc_server *, char *, char *);
|
||||
extern int config_read ();
|
||||
extern int config_create_default ();
|
||||
extern int config_write ();
|
||||
|
||||
@@ -344,10 +344,8 @@ gui_draw_buffer_title (t_gui_buffer *buffer, int erase)
|
||||
{
|
||||
/* TODO: change this copyright as title? */
|
||||
mvwprintw (ptr_win->win_title, 0, 0,
|
||||
"%s", PACKAGE_STRING " - " WEECHAT_WEBSITE);
|
||||
mvwprintw (ptr_win->win_title, 0,
|
||||
ptr_win->win_width - strlen (WEECHAT_COPYRIGHT),
|
||||
"%s", WEECHAT_COPYRIGHT);
|
||||
"%s",
|
||||
PACKAGE_STRING " " WEECHAT_COPYRIGHT_DATE " - " WEECHAT_WEBSITE);
|
||||
}
|
||||
}
|
||||
wrefresh (ptr_win->win_title);
|
||||
|
||||
+3
-2
@@ -1,17 +1,18 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
ChangeLog - 2005-01-04
|
||||
ChangeLog - 2005-01-06
|
||||
|
||||
|
||||
Version 0.1.0 (under dev!):
|
||||
* improved /set command: empty strings are allowed, new colors, server
|
||||
options can be changed while WeeChat is running
|
||||
* added default away/part/quit messages in config file
|
||||
* new [irc] section in config file, option "look_display_away" moved to
|
||||
"irc_display_away"
|
||||
* server messages & errors are all prefixed (by 3 chars, like '-@-')
|
||||
* added new options for charset: look_charset_decode and look_charset_encode
|
||||
* fixed /away command (now ok if not away)
|
||||
* fixed /set command (now empty strings are allowed)
|
||||
|
||||
Version 0.0.9 (2005-01-01):
|
||||
* auto-reconnection to server (new options: server_autoreconnect (on/off),
|
||||
|
||||
+63
-59
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.1.0-cvs\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2005-01-04 23:15+0100\n"
|
||||
"POT-Creation-Date: 2005-01-05 23:47+0100\n"
|
||||
"PO-Revision-Date: 2005-01-01 13:00+0100\n"
|
||||
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -20,7 +20,7 @@ msgstr ""
|
||||
msgid "%s cannot allocate new nick\n"
|
||||
msgstr "%s ompossible d'allouer un nouveau pseudo\n"
|
||||
|
||||
#: src/irc/irc-server.c:136 src/common/weeconfig.c:1286
|
||||
#: src/irc/irc-server.c:136 src/common/weeconfig.c:1397
|
||||
msgid "Unable to get user's name"
|
||||
msgstr "Impossible de déterminer le nom d'utilisateur"
|
||||
|
||||
@@ -1753,51 +1753,51 @@ msgstr ""
|
||||
"%s impossible d'ajouter la fonction pour le message \"%s\" (mémoire "
|
||||
"insuffisante)\n"
|
||||
|
||||
#: src/gui/curses/gui-display.c:574
|
||||
#: src/gui/curses/gui-display.c:572
|
||||
msgid "bytes"
|
||||
msgstr "octets"
|
||||
|
||||
#: src/gui/curses/gui-display.c:574
|
||||
#: src/gui/curses/gui-display.c:572
|
||||
msgid "Kb"
|
||||
msgstr "Ko"
|
||||
|
||||
#: src/gui/curses/gui-display.c:574
|
||||
#: src/gui/curses/gui-display.c:572
|
||||
msgid "Mb"
|
||||
msgstr "Mo"
|
||||
|
||||
#: src/gui/curses/gui-display.c:574
|
||||
#: src/gui/curses/gui-display.c:572
|
||||
msgid "Gb"
|
||||
msgstr "Go"
|
||||
|
||||
#: src/gui/curses/gui-display.c:1008
|
||||
#: src/gui/curses/gui-display.c:1006
|
||||
#, c-format
|
||||
msgid "%d:[not connected] "
|
||||
msgstr "%d:[non connecté] "
|
||||
|
||||
#: src/gui/curses/gui-display.c:1016
|
||||
#: src/gui/curses/gui-display.c:1014
|
||||
msgid "[Act: "
|
||||
msgstr "[Act: "
|
||||
|
||||
#: src/gui/curses/gui-display.c:1055 src/gui/curses/gui-display.c:1058
|
||||
#: src/gui/curses/gui-display.c:1053 src/gui/curses/gui-display.c:1056
|
||||
msgid "-MORE-"
|
||||
msgstr "-PLUS-"
|
||||
|
||||
#: src/gui/curses/gui-display.c:1227
|
||||
#: src/gui/curses/gui-display.c:1225
|
||||
msgid " [A] Accept"
|
||||
msgstr " [A] Accepter"
|
||||
|
||||
#: src/gui/curses/gui-display.c:1228 src/gui/curses/gui-display.c:1234
|
||||
#: src/gui/curses/gui-display.c:1241
|
||||
#: src/gui/curses/gui-display.c:1226 src/gui/curses/gui-display.c:1232
|
||||
#: src/gui/curses/gui-display.c:1239
|
||||
msgid " [C] Cancel"
|
||||
msgstr " [C] Annuler"
|
||||
|
||||
#: src/gui/curses/gui-display.c:1229 src/gui/curses/gui-display.c:1235
|
||||
#: src/gui/curses/gui-display.c:1242 src/gui/curses/gui-display.c:1249
|
||||
#: src/gui/curses/gui-display.c:1254
|
||||
#: src/gui/curses/gui-display.c:1227 src/gui/curses/gui-display.c:1233
|
||||
#: src/gui/curses/gui-display.c:1240 src/gui/curses/gui-display.c:1247
|
||||
#: src/gui/curses/gui-display.c:1252
|
||||
msgid " [Q] Close DCC view"
|
||||
msgstr " [Q] Fermer la vue DCC"
|
||||
|
||||
#: src/gui/curses/gui-display.c:1248
|
||||
#: src/gui/curses/gui-display.c:1246
|
||||
msgid " [R] Remove"
|
||||
msgstr " [R] Retirer"
|
||||
|
||||
@@ -2177,6 +2177,7 @@ msgid "%s already connected to server \"%s\"!\n"
|
||||
msgstr "%s déjà connecté au serveur \"%s\" !\n"
|
||||
|
||||
#: src/common/command.c:1090 src/common/command.c:1128
|
||||
#: src/common/command.c:1704
|
||||
#, c-format
|
||||
msgid "%s server \"%s\" not found\n"
|
||||
msgstr "%s serveur \"%s\" non trouvé\n"
|
||||
@@ -2250,7 +2251,7 @@ msgstr " Commande /%s => Perl(%s)\n"
|
||||
msgid "Perl scripts unloaded\n"
|
||||
msgstr "Scripts Perl déchargés\n"
|
||||
|
||||
#: src/common/command.c:1325 src/common/command.c:1789
|
||||
#: src/common/command.c:1325 src/common/command.c:1917
|
||||
#, c-format
|
||||
msgid "%s unknown option for \"%s\" command\n"
|
||||
msgstr "%s option inconnue pour la commande \"%s\"\n"
|
||||
@@ -2331,50 +2332,53 @@ msgstr "cr
|
||||
msgid "%s unable to create server\n"
|
||||
msgstr "%s impossible de créer le serveur\n"
|
||||
|
||||
#: src/common/command.c:1629
|
||||
#, c-format
|
||||
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
|
||||
msgstr "%s l'option \"%s\" ne peut pas être changée lorsque WeeChat tourne\n"
|
||||
#: src/common/command.c:1633
|
||||
msgid "(unknown)"
|
||||
msgstr "(inconnu)"
|
||||
|
||||
#: src/common/command.c:1641
|
||||
#, c-format
|
||||
msgid "%s incorrect value for option \"%s\"\n"
|
||||
msgstr "%s valeur incorrecte pour l'option \"%s\"\n"
|
||||
#: src/common/command.c:1656
|
||||
msgid "(password hidden) "
|
||||
msgstr "(mot de passe caché)"
|
||||
|
||||
#: src/common/command.c:1647
|
||||
#: src/common/command.c:1732 src/common/command.c:1772
|
||||
#, c-format
|
||||
msgid "%s config option \"%s\" not found\n"
|
||||
msgstr "%s option de configuration \"%s\" non trouvée\n"
|
||||
|
||||
#: src/common/command.c:1697
|
||||
msgid "(unknown)"
|
||||
msgstr "(inconnu)"
|
||||
#: src/common/command.c:1736 src/common/command.c:1766
|
||||
#, c-format
|
||||
msgid "%s incorrect value for option \"%s\"\n"
|
||||
msgstr "%s valeur incorrecte pour l'option \"%s\"\n"
|
||||
|
||||
#: src/common/command.c:1717
|
||||
#: src/common/command.c:1751
|
||||
#, c-format
|
||||
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
|
||||
msgstr "%s l'option \"%s\" ne peut pas être changée lorsque WeeChat tourne\n"
|
||||
|
||||
#: src/common/command.c:1845
|
||||
#, c-format
|
||||
msgid "No config option found with \"%s\"\n"
|
||||
msgstr "Aucune option de configuration trouvée avec \"%s\"\n"
|
||||
|
||||
#: src/common/command.c:1720
|
||||
#: src/common/command.c:1848
|
||||
msgid "No config option found\n"
|
||||
msgstr "Aucune option de configuration trouvée\n"
|
||||
|
||||
#: src/common/command.c:1725
|
||||
#: src/common/command.c:1854
|
||||
#, c-format
|
||||
msgid "%d config option(s) found with \"%s\"\n"
|
||||
msgstr "%d option(s) de configuration trouvées avec \"%s\"\n"
|
||||
msgid "config option(s) found with \"%s\"\n"
|
||||
msgstr "option(s) de configuration trouvée(s) avec \"%s\"\n"
|
||||
|
||||
#: src/common/command.c:1728
|
||||
#, c-format
|
||||
msgid "%d config option(s) found\n"
|
||||
msgstr "%d option(s) de configuration trouvées\n"
|
||||
#: src/common/command.c:1857
|
||||
msgid "config option(s) found\n"
|
||||
msgstr "option(s) de configuration trouvée(s)\n"
|
||||
|
||||
#: src/common/command.c:1748
|
||||
#: src/common/command.c:1876
|
||||
#, c-format
|
||||
msgid "%s alias or command \"%s\" not found\n"
|
||||
msgstr "%s alias ou commande \"%s\" non trouvé\n"
|
||||
|
||||
#: src/common/command.c:1757
|
||||
#: src/common/command.c:1885
|
||||
#, c-format
|
||||
msgid "Alias \"%s\" removed\n"
|
||||
msgstr "Alias \"%s\" supprimé\n"
|
||||
@@ -3215,57 +3219,57 @@ msgstr ""
|
||||
msgid "automatically rejoin channels when kicked"
|
||||
msgstr "rejoindre automatiquement les canaux quand mis dehors"
|
||||
|
||||
#: src/common/weeconfig.c:846
|
||||
#: src/common/weeconfig.c:957
|
||||
#, 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:855
|
||||
#: src/common/weeconfig.c:966
|
||||
#, 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:869
|
||||
#: src/common/weeconfig.c:980
|
||||
#, 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:908
|
||||
#: src/common/weeconfig.c:1019
|
||||
#, 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:919
|
||||
#: src/common/weeconfig.c:1030
|
||||
#, 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:958
|
||||
#: src/common/weeconfig.c:1069
|
||||
#, c-format
|
||||
msgid "%s config file \"%s\" not found.\n"
|
||||
msgstr "%s fichier de configuration \"%s\" non trouvé.\n"
|
||||
|
||||
#: src/common/weeconfig.c:990
|
||||
#: src/common/weeconfig.c:1101
|
||||
#, 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:1007
|
||||
#: src/common/weeconfig.c:1118
|
||||
#, 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:1025
|
||||
#: src/common/weeconfig.c:1136
|
||||
#, 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:1059
|
||||
#: src/common/weeconfig.c:1170
|
||||
#, c-format
|
||||
msgid "%s %s, line %d: invalid option \"%s\"\n"
|
||||
msgstr "%s %s, ligne %d: option \"%s\" invalide\n"
|
||||
|
||||
#: src/common/weeconfig.c:1070
|
||||
#: src/common/weeconfig.c:1181
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s %s, line %d: invalid value foroption '%s'\n"
|
||||
@@ -3274,7 +3278,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:1079
|
||||
#: src/common/weeconfig.c:1190
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s %s, line %d: invalid value for option '%s'\n"
|
||||
@@ -3283,7 +3287,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:1090
|
||||
#: src/common/weeconfig.c:1201
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s %s, line %d: invalid value for option '%s'\n"
|
||||
@@ -3292,26 +3296,26 @@ msgstr ""
|
||||
"%s %s, ligne %d: valeur invalide pour l'option '%s'\n"
|
||||
"Attendu: une de ces chaînes: "
|
||||
|
||||
#: src/common/weeconfig.c:1106
|
||||
#: src/common/weeconfig.c:1217
|
||||
#, 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:1165 src/common/weeconfig.c:1338
|
||||
#: src/common/weeconfig.c:1276 src/common/weeconfig.c:1449
|
||||
#, c-format
|
||||
msgid "%s cannot create file \"%s\"\n"
|
||||
msgstr "%s impossible de créer le fichier \"%s\"\n"
|
||||
|
||||
#: src/common/weeconfig.c:1171
|
||||
#: src/common/weeconfig.c:1282
|
||||
#, 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:1172
|
||||
#: src/common/weeconfig.c:1283
|
||||
msgid "creating default config file\n"
|
||||
msgstr "création du fichier de configuration par défaut\n"
|
||||
|
||||
#: src/common/weeconfig.c:1175 src/common/weeconfig.c:1347
|
||||
#: src/common/weeconfig.c:1286 src/common/weeconfig.c:1458
|
||||
#, c-format
|
||||
msgid ""
|
||||
"#\n"
|
||||
@@ -3320,6 +3324,6 @@ msgstr ""
|
||||
"#\n"
|
||||
"# %s: fichier de configuration, créé par %s v%s le %s#\n"
|
||||
|
||||
#: src/common/weeconfig.c:1344
|
||||
#: src/common/weeconfig.c:1455
|
||||
msgid "saving config to disk\n"
|
||||
msgstr "sauvegarde de la configuration sur disque\n"
|
||||
|
||||
+58
-54
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2005-01-04 23:15+0100\n"
|
||||
"POT-Creation-Date: 2005-01-05 23:47+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,7 +20,7 @@ msgstr ""
|
||||
msgid "%s cannot allocate new nick\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/irc/irc-server.c:136 src/common/weeconfig.c:1286
|
||||
#: src/irc/irc-server.c:136 src/common/weeconfig.c:1397
|
||||
msgid "Unable to get user's name"
|
||||
msgstr ""
|
||||
|
||||
@@ -1641,51 +1641,51 @@ msgstr ""
|
||||
msgid "%s unable to add handler for \"%s\" message (not enough memory)\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/curses/gui-display.c:574
|
||||
#: src/gui/curses/gui-display.c:572
|
||||
msgid "bytes"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/curses/gui-display.c:574
|
||||
#: src/gui/curses/gui-display.c:572
|
||||
msgid "Kb"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/curses/gui-display.c:574
|
||||
#: src/gui/curses/gui-display.c:572
|
||||
msgid "Mb"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/curses/gui-display.c:574
|
||||
#: src/gui/curses/gui-display.c:572
|
||||
msgid "Gb"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/curses/gui-display.c:1008
|
||||
#: src/gui/curses/gui-display.c:1006
|
||||
#, c-format
|
||||
msgid "%d:[not connected] "
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/curses/gui-display.c:1016
|
||||
#: src/gui/curses/gui-display.c:1014
|
||||
msgid "[Act: "
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/curses/gui-display.c:1055 src/gui/curses/gui-display.c:1058
|
||||
#: src/gui/curses/gui-display.c:1053 src/gui/curses/gui-display.c:1056
|
||||
msgid "-MORE-"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/curses/gui-display.c:1227
|
||||
#: src/gui/curses/gui-display.c:1225
|
||||
msgid " [A] Accept"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/curses/gui-display.c:1228 src/gui/curses/gui-display.c:1234
|
||||
#: src/gui/curses/gui-display.c:1241
|
||||
#: src/gui/curses/gui-display.c:1226 src/gui/curses/gui-display.c:1232
|
||||
#: src/gui/curses/gui-display.c:1239
|
||||
msgid " [C] Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/curses/gui-display.c:1229 src/gui/curses/gui-display.c:1235
|
||||
#: src/gui/curses/gui-display.c:1242 src/gui/curses/gui-display.c:1249
|
||||
#: src/gui/curses/gui-display.c:1254
|
||||
#: src/gui/curses/gui-display.c:1227 src/gui/curses/gui-display.c:1233
|
||||
#: src/gui/curses/gui-display.c:1240 src/gui/curses/gui-display.c:1247
|
||||
#: src/gui/curses/gui-display.c:1252
|
||||
msgid " [Q] Close DCC view"
|
||||
msgstr ""
|
||||
|
||||
#: src/gui/curses/gui-display.c:1248
|
||||
#: src/gui/curses/gui-display.c:1246
|
||||
msgid " [R] Remove"
|
||||
msgstr ""
|
||||
|
||||
@@ -2020,6 +2020,7 @@ msgid "%s already connected to server \"%s\"!\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1090 src/common/command.c:1128
|
||||
#: src/common/command.c:1704
|
||||
#, c-format
|
||||
msgid "%s server \"%s\" not found\n"
|
||||
msgstr ""
|
||||
@@ -2093,7 +2094,7 @@ msgstr ""
|
||||
msgid "Perl scripts unloaded\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1325 src/common/command.c:1789
|
||||
#: src/common/command.c:1325 src/common/command.c:1917
|
||||
#, c-format
|
||||
msgid "%s unknown option for \"%s\" command\n"
|
||||
msgstr ""
|
||||
@@ -2171,50 +2172,53 @@ msgstr ""
|
||||
msgid "%s unable to create server\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1629
|
||||
#, c-format
|
||||
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
|
||||
#: src/common/command.c:1633
|
||||
msgid "(unknown)"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1641
|
||||
#, c-format
|
||||
msgid "%s incorrect value for option \"%s\"\n"
|
||||
#: src/common/command.c:1656
|
||||
msgid "(password hidden) "
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1647
|
||||
#: src/common/command.c:1732 src/common/command.c:1772
|
||||
#, c-format
|
||||
msgid "%s config option \"%s\" not found\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1697
|
||||
msgid "(unknown)"
|
||||
#: src/common/command.c:1736 src/common/command.c:1766
|
||||
#, c-format
|
||||
msgid "%s incorrect value for option \"%s\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1717
|
||||
#: src/common/command.c:1751
|
||||
#, c-format
|
||||
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1845
|
||||
#, c-format
|
||||
msgid "No config option found with \"%s\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1720
|
||||
#: src/common/command.c:1848
|
||||
msgid "No config option found\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1725
|
||||
#: src/common/command.c:1854
|
||||
#, c-format
|
||||
msgid "%d config option(s) found with \"%s\"\n"
|
||||
msgid "config option(s) found with \"%s\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1728
|
||||
#, c-format
|
||||
msgid "%d config option(s) found\n"
|
||||
#: src/common/command.c:1857
|
||||
msgid "config option(s) found\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1748
|
||||
#: src/common/command.c:1876
|
||||
#, c-format
|
||||
msgid "%s alias or command \"%s\" not found\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/command.c:1757
|
||||
#: src/common/command.c:1885
|
||||
#, c-format
|
||||
msgid "Alias \"%s\" removed\n"
|
||||
msgstr ""
|
||||
@@ -3003,103 +3007,103 @@ msgstr ""
|
||||
msgid "automatically rejoin channels when kicked"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:846
|
||||
#: src/common/weeconfig.c:957
|
||||
#, c-format
|
||||
msgid "%s %s, line %d: new server, but previous was incomplete\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:855
|
||||
#: src/common/weeconfig.c:966
|
||||
#, c-format
|
||||
msgid "%s %s, line %d: server '%s' already exists\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:869
|
||||
#: src/common/weeconfig.c:980
|
||||
#, c-format
|
||||
msgid "%s %s, line %d: unable to create server\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:908
|
||||
#: src/common/weeconfig.c:1019
|
||||
#, c-format
|
||||
msgid "%s unable to assign default int with string (\"%s\")\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:919
|
||||
#: src/common/weeconfig.c:1030
|
||||
#, c-format
|
||||
msgid "%s unable to assign default color (\"%s\")\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:958
|
||||
#: src/common/weeconfig.c:1069
|
||||
#, c-format
|
||||
msgid "%s config file \"%s\" not found.\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:990
|
||||
#: src/common/weeconfig.c:1101
|
||||
#, c-format
|
||||
msgid "%s %s, line %d: invalid syntax, missing \"]\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:1007
|
||||
#: src/common/weeconfig.c:1118
|
||||
#, c-format
|
||||
msgid "%s %s, line %d: unknown section identifier (\"%s\")\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:1025
|
||||
#: src/common/weeconfig.c:1136
|
||||
#, c-format
|
||||
msgid "%s %s, line %d: invalid syntax, missing \"=\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:1059
|
||||
#: src/common/weeconfig.c:1170
|
||||
#, c-format
|
||||
msgid "%s %s, line %d: invalid option \"%s\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:1070
|
||||
#: src/common/weeconfig.c:1181
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s %s, line %d: invalid value foroption '%s'\n"
|
||||
"Expected: boolean value: 'off' or 'on'\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:1079
|
||||
#: src/common/weeconfig.c:1190
|
||||
#, 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:1090
|
||||
#: src/common/weeconfig.c:1201
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s %s, line %d: invalid value for option '%s'\n"
|
||||
"Expected: one of these strings: "
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:1106
|
||||
#: src/common/weeconfig.c:1217
|
||||
#, c-format
|
||||
msgid "%s %s, line %d: invalid color name for option '%s'\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:1165 src/common/weeconfig.c:1338
|
||||
#: src/common/weeconfig.c:1276 src/common/weeconfig.c:1449
|
||||
#, c-format
|
||||
msgid "%s cannot create file \"%s\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:1171
|
||||
#: src/common/weeconfig.c:1282
|
||||
#, c-format
|
||||
msgid "%s: creating default config file...\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:1172
|
||||
#: src/common/weeconfig.c:1283
|
||||
msgid "creating default config file\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:1175 src/common/weeconfig.c:1347
|
||||
#: src/common/weeconfig.c:1286 src/common/weeconfig.c:1458
|
||||
#, c-format
|
||||
msgid ""
|
||||
"#\n"
|
||||
"# %s configuration file, created by %s v%s on %s#\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/weeconfig.c:1344
|
||||
#: src/common/weeconfig.c:1455
|
||||
msgid "saving config to disk\n"
|
||||
msgstr ""
|
||||
|
||||
+189
-60
@@ -1592,6 +1592,77 @@ weechat_cmd_server (int argc, char **argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_set_cmd_display_option: display config option
|
||||
*/
|
||||
|
||||
void
|
||||
weechat_set_cmd_display_option (t_config_option *option, char *prefix, void *value)
|
||||
{
|
||||
char *color_name, *pos_nickserv, *pos_pwd, *value2;
|
||||
|
||||
gui_printf (NULL, " %s%s%s",
|
||||
(prefix) ? prefix : "",
|
||||
(prefix) ? "." : "",
|
||||
option->option_name);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, " = ");
|
||||
if (!value)
|
||||
{
|
||||
if (option->option_type == OPTION_TYPE_STRING)
|
||||
value = option->ptr_string;
|
||||
else
|
||||
value = option->ptr_int;
|
||||
}
|
||||
switch (option->option_type)
|
||||
{
|
||||
case OPTION_TYPE_BOOLEAN:
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_HOST,
|
||||
"%s\n", (*((int *)value)) ? "ON" : "OFF");
|
||||
break;
|
||||
case OPTION_TYPE_INT:
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_HOST,
|
||||
"%d\n", *((int *)value));
|
||||
break;
|
||||
case OPTION_TYPE_INT_WITH_STRING:
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_HOST,
|
||||
"%s\n", option->array_values[*((int *)value)]);
|
||||
break;
|
||||
case OPTION_TYPE_COLOR:
|
||||
color_name = gui_get_color_by_value (*((int *)value));
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_HOST,
|
||||
"%s\n", (color_name) ? color_name : _("(unknown)"));
|
||||
break;
|
||||
case OPTION_TYPE_STRING:
|
||||
if (*((char **)value))
|
||||
{
|
||||
value2 = strdup (*((char **)value));
|
||||
pos_nickserv = NULL;
|
||||
pos_pwd = NULL;
|
||||
pos_nickserv = strstr (value2, "nickserv");
|
||||
if (pos_nickserv)
|
||||
{
|
||||
pos_pwd = strstr (value2, "identify ");
|
||||
if (!pos_pwd)
|
||||
pos_pwd = strstr (value2, "register ");
|
||||
}
|
||||
if (cfg_log_hide_nickserv_pwd && pos_nickserv && pos_pwd)
|
||||
{
|
||||
pos_pwd += 9;
|
||||
while (pos_pwd[0])
|
||||
{
|
||||
pos_pwd[0] = '*';
|
||||
pos_pwd++;
|
||||
}
|
||||
gui_printf (NULL, _("(password hidden) "));
|
||||
}
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_HOST, "%s", value2);
|
||||
free (value2);
|
||||
}
|
||||
gui_printf (NULL, "\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_cmd_set: set options
|
||||
*/
|
||||
@@ -1599,10 +1670,12 @@ weechat_cmd_server (int argc, char **argv)
|
||||
int
|
||||
weechat_cmd_set (char *arguments)
|
||||
{
|
||||
char *option, *value;
|
||||
char *option, *value, *pos;
|
||||
int i, j, section_displayed;
|
||||
char *color_name;
|
||||
t_config_option *ptr_option;
|
||||
t_irc_server *ptr_server;
|
||||
char option_name[256];
|
||||
void *ptr_option_value;
|
||||
int number_found;
|
||||
|
||||
option = NULL;
|
||||
@@ -1620,32 +1693,86 @@ weechat_cmd_set (char *arguments)
|
||||
|
||||
if (value)
|
||||
{
|
||||
ptr_option = config_option_search (option);
|
||||
if (ptr_option)
|
||||
pos = strchr (option, '.');
|
||||
if (pos)
|
||||
{
|
||||
if (ptr_option->handler_change == NULL)
|
||||
{
|
||||
/* server config option modification */
|
||||
pos[0] = '\0';
|
||||
ptr_server = server_search (option);
|
||||
if (!ptr_server)
|
||||
gui_printf (NULL,
|
||||
_("%s option \"%s\" can not be changed while WeeChat is running\n"),
|
||||
_("%s server \"%s\" not found\n"),
|
||||
WEECHAT_ERROR, option);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (config_option_set_value (ptr_option, value) == 0)
|
||||
switch (config_set_server_value (ptr_server, pos + 1, value))
|
||||
{
|
||||
(void) (ptr_option->handler_change());
|
||||
gui_printf (NULL, "[%s]\n", config_get_section (ptr_option));
|
||||
gui_printf (NULL, " %s = %s\n", option, value);
|
||||
case 0:
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "[");
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, "%s",
|
||||
config_sections[CONFIG_SECTION_SERVER].section_name);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_NICK, " %s",
|
||||
ptr_server->name);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "]\n");
|
||||
for (i = 0; weechat_options[CONFIG_SECTION_SERVER][i].option_name; i++)
|
||||
{
|
||||
if (strcmp (weechat_options[CONFIG_SECTION_SERVER][i].option_name, pos + 1) == 0)
|
||||
break;
|
||||
}
|
||||
if (weechat_options[CONFIG_SECTION_SERVER][i].option_name)
|
||||
{
|
||||
ptr_option_value = config_get_server_option_ptr (ptr_server,
|
||||
weechat_options[CONFIG_SECTION_SERVER][i].option_name);
|
||||
weechat_set_cmd_display_option (&weechat_options[CONFIG_SECTION_SERVER][i],
|
||||
ptr_server->name,
|
||||
ptr_option_value);
|
||||
}
|
||||
config_change_buffer_content ();
|
||||
break;
|
||||
case -1:
|
||||
gui_printf (NULL, _("%s config option \"%s\" not found\n"),
|
||||
WEECHAT_ERROR, pos + 1);
|
||||
break;
|
||||
case -2:
|
||||
gui_printf (NULL, _("%s incorrect value for option \"%s\"\n"),
|
||||
WEECHAT_ERROR, pos + 1);
|
||||
break;
|
||||
}
|
||||
else
|
||||
gui_printf (NULL, _("%s incorrect value for option \"%s\"\n"),
|
||||
WEECHAT_ERROR, option);
|
||||
}
|
||||
pos[0] = '.';
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_printf (NULL, _("%s config option \"%s\" not found\n"),
|
||||
WEECHAT_ERROR, option);
|
||||
ptr_option = config_option_search (option);
|
||||
if (ptr_option)
|
||||
{
|
||||
if (ptr_option->handler_change == NULL)
|
||||
{
|
||||
gui_printf (NULL,
|
||||
_("%s option \"%s\" can not be changed while WeeChat is running\n"),
|
||||
WEECHAT_ERROR, option);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (config_option_set_value (ptr_option, value) == 0)
|
||||
{
|
||||
(void) (ptr_option->handler_change());
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "[");
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL,
|
||||
"%s", config_get_section (ptr_option));
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "]\n");
|
||||
weechat_set_cmd_display_option (ptr_option, NULL, NULL);
|
||||
}
|
||||
else
|
||||
gui_printf (NULL, _("%s incorrect value for option \"%s\"\n"),
|
||||
WEECHAT_ERROR, option);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_printf (NULL, _("%s config option \"%s\" not found\n"),
|
||||
WEECHAT_ERROR, option);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1665,47 +1792,49 @@ weechat_cmd_set (char *arguments)
|
||||
{
|
||||
if (!section_displayed)
|
||||
{
|
||||
gui_printf (NULL, "[%s]\n",
|
||||
config_sections[i].section_name);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "[");
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL,
|
||||
"%s",
|
||||
config_sections[i].section_name);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "]\n");
|
||||
section_displayed = 1;
|
||||
}
|
||||
switch (weechat_options[i][j].option_type)
|
||||
{
|
||||
case OPTION_TYPE_BOOLEAN:
|
||||
gui_printf (NULL, " %s = %s\n",
|
||||
weechat_options[i][j].option_name,
|
||||
(*weechat_options[i][j].ptr_int) ?
|
||||
"ON" : "OFF");
|
||||
break;
|
||||
case OPTION_TYPE_INT:
|
||||
gui_printf (NULL,
|
||||
" %s = %d\n",
|
||||
weechat_options[i][j].option_name,
|
||||
*weechat_options[i][j].ptr_int);
|
||||
break;
|
||||
case OPTION_TYPE_INT_WITH_STRING:
|
||||
gui_printf (NULL,
|
||||
" %s = %s\n",
|
||||
weechat_options[i][j].option_name,
|
||||
weechat_options[i][j].array_values[*weechat_options[i][j].ptr_int]);
|
||||
break;
|
||||
case OPTION_TYPE_COLOR:
|
||||
color_name = gui_get_color_by_value (*weechat_options[i][j].ptr_int);
|
||||
gui_printf (NULL,
|
||||
" %s = %s\n",
|
||||
weechat_options[i][j].option_name,
|
||||
(color_name) ? color_name : _("(unknown)"));
|
||||
break;
|
||||
case OPTION_TYPE_STRING:
|
||||
gui_printf (NULL, " %s = %s\n",
|
||||
weechat_options[i][j].
|
||||
option_name,
|
||||
(*weechat_options[i][j].
|
||||
ptr_string) ?
|
||||
*weechat_options[i][j].
|
||||
ptr_string : "");
|
||||
break;
|
||||
}
|
||||
weechat_set_cmd_display_option (&weechat_options[i][j], NULL, NULL);
|
||||
number_found++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (ptr_server = irc_servers; ptr_server;
|
||||
ptr_server = ptr_server->next_server)
|
||||
{
|
||||
section_displayed = 0;
|
||||
for (i = 0; weechat_options[CONFIG_SECTION_SERVER][i].option_name; i++)
|
||||
{
|
||||
snprintf (option_name, sizeof (option_name), "%s.%s",
|
||||
ptr_server->name,
|
||||
weechat_options[CONFIG_SECTION_SERVER][i].option_name);
|
||||
if ((!option) ||
|
||||
((option) && (option[0])
|
||||
&& (strstr (option_name, option) != NULL)))
|
||||
{
|
||||
if (!section_displayed)
|
||||
{
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "[");
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, "%s",
|
||||
config_sections[CONFIG_SECTION_SERVER].section_name);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_NICK, " %s",
|
||||
ptr_server->name);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "]\n");
|
||||
section_displayed = 1;
|
||||
}
|
||||
ptr_option_value = config_get_server_option_ptr (ptr_server,
|
||||
weechat_options[CONFIG_SECTION_SERVER][i].option_name);
|
||||
if (ptr_option_value)
|
||||
{
|
||||
weechat_set_cmd_display_option (&weechat_options[CONFIG_SECTION_SERVER][i],
|
||||
ptr_server->name,
|
||||
ptr_option_value);
|
||||
number_found++;
|
||||
}
|
||||
}
|
||||
@@ -1721,12 +1850,12 @@ weechat_cmd_set (char *arguments)
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, "%d ", number_found);
|
||||
if (option)
|
||||
gui_printf (NULL, _("%d config option(s) found with \"%s\"\n"),
|
||||
number_found, option);
|
||||
gui_printf (NULL, _("config option(s) found with \"%s\"\n"),
|
||||
option);
|
||||
else
|
||||
gui_printf (NULL, _("%d config option(s) found\n"),
|
||||
number_found);
|
||||
gui_printf (NULL, _("config option(s) found\n"));
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
#define WEECHAT_COPYRIGHT PACKAGE_NAME " (c) 2003-2005 by Wee Team"
|
||||
#define WEECHAT_COPYRIGHT_DATE "(c) 2003-2005"
|
||||
#define WEECHAT_WEBSITE "http://weechat.flashtux.org"
|
||||
|
||||
#define WEECHAT_ERROR _(PACKAGE_NAME " Error:")
|
||||
@@ -57,10 +57,7 @@
|
||||
|
||||
#define WEE_LICENSE \
|
||||
PACKAGE_STRING " (c) Copyright 2003-2005, compiled on " __DATE__ " " __TIME__ \
|
||||
"\nDeveloped by FlashCode <flashcode@flashtux.org>\n" \
|
||||
" Bounga <bounga@altern.org>\n" \
|
||||
" Xahlexx <xahlexx@weeland.org>\n" \
|
||||
"Website: " WEECHAT_WEBSITE "\n\n" \
|
||||
"\nDeveloped by FlashCode <flashcode@flashtux.org> - " WEECHAT_WEBSITE "\n\n" \
|
||||
"This program is free software; you can redistribute it and/or modify\n" \
|
||||
"it under the terms of the GNU General Public License as published by\n" \
|
||||
"the Free Software Foundation; either version 2 of the License, or\n" \
|
||||
@@ -78,7 +75,7 @@
|
||||
|
||||
#define WEE_USAGE1 \
|
||||
PACKAGE_STRING " (c) Copyright 2003-2005, compiled on " __DATE__ " " __TIME__ \
|
||||
"\nDeveloped by FlashCode, Bounga and Xahlexx - " WEECHAT_WEBSITE "\n\n" \
|
||||
"\nDeveloped by FlashCode <flashcode@flashtux.org> - " WEECHAT_WEBSITE "\n\n" \
|
||||
"Usage: %s [options ...]\n" \
|
||||
" or: %s [irc://[nickname[:password]@]irc.example.org[:port][/channel] ...]\n\n"
|
||||
|
||||
|
||||
@@ -409,11 +409,11 @@ t_config_option weechat_options_history[] =
|
||||
N_("maximum number of lines in history "
|
||||
"for one server/channel/private window (0 = unlimited)"),
|
||||
OPTION_TYPE_INT, 0, INT_MAX, 4096,
|
||||
NULL, NULL, &cfg_history_max_lines, NULL, NULL },
|
||||
NULL, NULL, &cfg_history_max_lines, NULL, config_change_noop },
|
||||
{ "history_max_commands", N_("max user commands in history"),
|
||||
N_("maximum number of user commands in history (0 = unlimited)"),
|
||||
OPTION_TYPE_INT, 0, INT_MAX, 100,
|
||||
NULL, NULL, &cfg_history_max_commands, NULL, NULL },
|
||||
NULL, NULL, &cfg_history_max_commands, NULL, config_change_noop },
|
||||
{ NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -442,15 +442,15 @@ t_config_option weechat_options_log[] =
|
||||
{ "log_path", N_("path for log files"),
|
||||
N_("path for WeeChat log files"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"~/.weechat/logs/", NULL, NULL, &cfg_log_path, NULL },
|
||||
"~/.weechat/logs/", NULL, NULL, &cfg_log_path, config_change_noop },
|
||||
{ "log_timestamp", N_("timestamp for log"),
|
||||
N_("timestamp for log (see man strftime for date/time specifiers)"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"%Y %b %d %H:%M:%S", NULL, NULL, &cfg_log_timestamp, NULL },
|
||||
"%Y %b %d %H:%M:%S", NULL, NULL, &cfg_log_timestamp, config_change_noop },
|
||||
{ "log_hide_nickserv_pwd", N_("hide password displayed by nickserv"),
|
||||
N_("hide password displayed by nickserv"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
NULL, NULL, &cfg_log_hide_nickserv_pwd, NULL, NULL },
|
||||
NULL, NULL, &cfg_log_hide_nickserv_pwd, NULL, config_change_noop },
|
||||
{ NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -539,19 +539,19 @@ t_config_option weechat_options_proxy[] =
|
||||
{ { "proxy_use", N_("use proxy"),
|
||||
N_("use a proxy server to connect to irc server"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_FALSE,
|
||||
NULL, NULL, &cfg_proxy_use, NULL, NULL },
|
||||
NULL, NULL, &cfg_proxy_use, NULL, config_change_noop },
|
||||
{ "proxy_address", N_("proxy address"),
|
||||
N_("proxy server address (IP or hostname)"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"", NULL, NULL, &cfg_proxy_address, NULL },
|
||||
"", NULL, NULL, &cfg_proxy_address, config_change_noop },
|
||||
{ "proxy_port", N_("port for proxy"),
|
||||
N_("port for connecting to proxy server"),
|
||||
OPTION_TYPE_INT, 0, 65535, 1080,
|
||||
NULL, NULL, &cfg_proxy_port, NULL, NULL },
|
||||
NULL, NULL, &cfg_proxy_port, NULL, config_change_noop },
|
||||
{ "proxy_password", N_("proxy password"),
|
||||
N_("password for proxy server"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"", NULL, NULL, &cfg_proxy_password, NULL },
|
||||
"", NULL, NULL, &cfg_proxy_password, config_change_noop },
|
||||
{ NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -780,6 +780,117 @@ config_option_set_value (t_config_option *option, char *value)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* config_get_server_option_ptr: get a pointer to a server config option
|
||||
*/
|
||||
|
||||
void *
|
||||
config_get_server_option_ptr (t_irc_server *server, char *option_name)
|
||||
{
|
||||
if (strcasecmp (option_name, "server_name") == 0)
|
||||
return (void *)(&server->name);
|
||||
if (strcasecmp (option_name, "server_autoconnect") == 0)
|
||||
return (void *)(&server->autoconnect);
|
||||
if (strcasecmp (option_name, "server_autoreconnect") == 0)
|
||||
return (void *)(&server->autoreconnect);
|
||||
if (strcasecmp (option_name, "server_autoreconnect_delay") == 0)
|
||||
return (void *)(&server->autoreconnect_delay);
|
||||
if (strcasecmp (option_name, "server_address") == 0)
|
||||
return (void *)(&server->address);
|
||||
if (strcasecmp (option_name, "server_port") == 0)
|
||||
return (void *)(&server->port);
|
||||
if (strcasecmp (option_name, "server_password") == 0)
|
||||
return (void *)(&server->password);
|
||||
if (strcasecmp (option_name, "server_nick1") == 0)
|
||||
return (void *)(&server->nick1);
|
||||
if (strcasecmp (option_name, "server_nick2") == 0)
|
||||
return (void *)(&server->nick2);
|
||||
if (strcasecmp (option_name, "server_nick3") == 0)
|
||||
return (void *)(&server->nick3);
|
||||
if (strcasecmp (option_name, "server_username") == 0)
|
||||
return (void *)(&server->username);
|
||||
if (strcasecmp (option_name, "server_realname") == 0)
|
||||
return (void *)(&server->realname);
|
||||
if (strcasecmp (option_name, "server_command") == 0)
|
||||
return (void *)(&server->command);
|
||||
if (strcasecmp (option_name, "server_command_delay") == 0)
|
||||
return (void *)(&server->command_delay);
|
||||
if (strcasecmp (option_name, "server_autojoin") == 0)
|
||||
return (void *)(&server->autojoin);
|
||||
if (strcasecmp (option_name, "server_autorejoin") == 0)
|
||||
return (void *)(&server->autorejoin);
|
||||
/* option not found */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* config_set_server_value: set new value for an option
|
||||
* return: 0 if success
|
||||
* -1 if option not found
|
||||
* -2 if bad value
|
||||
*/
|
||||
|
||||
int
|
||||
config_set_server_value (t_irc_server *server, char *option_name,
|
||||
char *value)
|
||||
{
|
||||
t_config_option *ptr_option;
|
||||
int i;
|
||||
void *ptr_data;
|
||||
int int_value;
|
||||
|
||||
ptr_data = config_get_server_option_ptr (server, option_name);
|
||||
if (!ptr_data)
|
||||
return -1;
|
||||
|
||||
ptr_option = NULL;
|
||||
for (i = 0; weechat_options[CONFIG_SECTION_SERVER][i].option_name; i++)
|
||||
{
|
||||
/* if option found, return pointer */
|
||||
if (strcasecmp (weechat_options[CONFIG_SECTION_SERVER][i].option_name, option_name) == 0)
|
||||
{
|
||||
ptr_option = &weechat_options[CONFIG_SECTION_SERVER][i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!ptr_option)
|
||||
return -1;
|
||||
|
||||
switch (ptr_option->option_type)
|
||||
{
|
||||
case OPTION_TYPE_BOOLEAN:
|
||||
if (strcasecmp (value, "on") == 0)
|
||||
*((int *)(ptr_data)) = BOOL_TRUE;
|
||||
else if (strcasecmp (value, "off") == 0)
|
||||
*((int *)(ptr_data)) = BOOL_FALSE;
|
||||
else
|
||||
return -2;
|
||||
break;
|
||||
case OPTION_TYPE_INT:
|
||||
int_value = atoi (value);
|
||||
if ((int_value < ptr_option->min) || (int_value > ptr_option->max))
|
||||
return -2;
|
||||
*((int *)(ptr_data)) = int_value;
|
||||
break;
|
||||
case OPTION_TYPE_INT_WITH_STRING:
|
||||
int_value = get_pos_array_values (ptr_option->array_values, value);
|
||||
if (int_value < 0)
|
||||
return -2;
|
||||
*((int *)(ptr_data)) = int_value;
|
||||
break;
|
||||
case OPTION_TYPE_COLOR:
|
||||
if (!gui_assign_color ((int *)ptr_data, value))
|
||||
return -2;
|
||||
break;
|
||||
case OPTION_TYPE_STRING:
|
||||
if (*((char **)ptr_data))
|
||||
free (*((char **)ptr_data));
|
||||
*((char **)ptr_data) = strdup (value);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* config_option_search: look for an option and return pointer to this option
|
||||
* if option is not found, NULL is returned
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#ifndef __WEECHAT_CONFIG_H
|
||||
#define __WEECHAT_CONFIG_H 1
|
||||
|
||||
#include "../irc/irc.h"
|
||||
|
||||
#define WEECHAT_CONFIG_NAME "weechat.rc"
|
||||
|
||||
#define CONFIG_SECTION_NONE -1
|
||||
@@ -179,6 +181,8 @@ extern void config_change_color ();
|
||||
extern int config_option_set_value (t_config_option *, char *);
|
||||
extern t_config_option *config_option_search (char *);
|
||||
extern int config_set_value (char *, char *);
|
||||
extern void *config_get_server_option_ptr (t_irc_server *, char *);
|
||||
extern int config_set_server_value (t_irc_server *, char *, char *);
|
||||
extern int config_read ();
|
||||
extern int config_create_default ();
|
||||
extern int config_write ();
|
||||
|
||||
@@ -344,10 +344,8 @@ gui_draw_buffer_title (t_gui_buffer *buffer, int erase)
|
||||
{
|
||||
/* TODO: change this copyright as title? */
|
||||
mvwprintw (ptr_win->win_title, 0, 0,
|
||||
"%s", PACKAGE_STRING " - " WEECHAT_WEBSITE);
|
||||
mvwprintw (ptr_win->win_title, 0,
|
||||
ptr_win->win_width - strlen (WEECHAT_COPYRIGHT),
|
||||
"%s", WEECHAT_COPYRIGHT);
|
||||
"%s",
|
||||
PACKAGE_STRING " " WEECHAT_COPYRIGHT_DATE " - " WEECHAT_WEBSITE);
|
||||
}
|
||||
}
|
||||
wrefresh (ptr_win->win_title);
|
||||
|
||||
Reference in New Issue
Block a user