diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-08-22 12:16:09 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-08-22 12:16:09 +0200 |
commit | 0a211bdc49c99a8272fdd158bddd4a2813f4ae8d (patch) | |
tree | 877a0e87e8a75c7a8b4b6df4ded2dd4a1389edea | |
parent | cba1ebdbf4fd8843ce4215512d66b02bb20b8b8b (diff) | |
download | weechat-0a211bdc49c99a8272fdd158bddd4a2813f4ae8d.zip |
Fix IRC /server command, fix bugs with IRC servers options, remove temporary server feature
-rw-r--r-- | po/cs.po | 83 | ||||
-rw-r--r-- | po/de.po | 79 | ||||
-rw-r--r-- | po/es.po | 95 | ||||
-rw-r--r-- | po/fr.po | 125 | ||||
-rw-r--r-- | po/hu.po | 84 | ||||
-rw-r--r-- | po/ru.po | 83 | ||||
-rw-r--r-- | po/weechat.pot | 58 | ||||
-rw-r--r-- | src/core/wee-config-file.c | 16 | ||||
-rw-r--r-- | src/plugins/irc/irc-command.c | 281 | ||||
-rw-r--r-- | src/plugins/irc/irc-config.c | 18 | ||||
-rw-r--r-- | src/plugins/irc/irc-config.h | 18 | ||||
-rw-r--r-- | src/plugins/irc/irc-display.c | 18 | ||||
-rw-r--r-- | src/plugins/irc/irc-server.c | 263 | ||||
-rw-r--r-- | src/plugins/irc/irc-server.h | 24 | ||||
-rw-r--r-- | src/plugins/irc/irc.c | 8 | ||||
-rw-r--r-- | src/plugins/plugin.c | 1 | ||||
-rw-r--r-- | src/plugins/scripts/lua/weechat-lua-api.c | 37 | ||||
-rw-r--r-- | src/plugins/scripts/perl/weechat-perl-api.c | 32 | ||||
-rw-r--r-- | src/plugins/scripts/python/weechat-python-api.c | 33 | ||||
-rw-r--r-- | src/plugins/scripts/ruby/weechat-ruby-api.c | 37 | ||||
-rw-r--r-- | src/plugins/weechat-plugin.h | 3 |
21 files changed, 844 insertions, 552 deletions
@@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-08-13 16:43+0200\n" +"POT-Creation-Date: 2008-08-22 12:08+0200\n" "PO-Revision-Date: 2007-09-06 12:44+0200\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -2109,7 +2109,7 @@ msgid "%s%s: error opening file, closing it" msgstr "%s chyba při čtení FIFO roury, zavírám ji\n" #, fuzzy, c-format -msgid "%s%s: invalid syntax for IRC server ('%s'), ignored" +msgid "%s%s: error with IRC server from URL (\"s\"), ignored" msgstr "%s nevalidní syntaxe pro IRC server ('%s'), ignorován\n" #, fuzzy, c-format @@ -2145,8 +2145,8 @@ msgid "%s%s: missing argument for \"%s\" option" msgstr "%s chybí argument pro volbu \"%s\"\n" #, fuzzy, c-format -msgid "%s: server %s%s%s created (temporary server, NOT SAVED!)" -msgstr "Server %s%s%s vytvořen (dočasný server, NEUKLÁDÁ SE!)\n" +msgid "%s: server %s%s%s created" +msgstr "Server %s%s%s vytvořen\n" #, fuzzy, c-format msgid "%s%s: unable to create server \"%s\"" @@ -2188,10 +2188,6 @@ msgstr "" "rozhovoru\n" #, fuzzy, c-format -msgid "%s%s: nick \"%s\" not found for \"%s\" command" -msgstr "%s přezdívka \"%s\" nebyla nalezena pro příkaz \"%s\"\n" - -#, fuzzy, c-format msgid "%s%s: cannot create new private buffer \"%s\"" msgstr "%s nemohu vytvořít nové soukromý buffer\"%s\"\n" @@ -2228,10 +2224,6 @@ msgid "%s%s: server \"%s\" already exists, can't create it!" msgstr "%s server \"%s\" již existuje, nemohu jej vytvořít!\n" #, fuzzy, c-format -msgid "%s: server %s%s%s created" -msgstr "Server %s%s%s vytvořen\n" - -#, fuzzy, c-format msgid "%s%s: unable to create server" msgstr "%s nemohu vytvořit server\n" @@ -2240,14 +2232,6 @@ msgid "%s: server %s%s%s has been copied to %s%s" msgstr "Server %s%s%s byl zkopírován do %s%s\n" #, fuzzy, c-format -msgid "%s%s: server \"%s\" is not a temporary server" -msgstr "%s server \"%s\" není dočasným serverem\n" - -#, fuzzy, c-format -msgid "%s: server %s%s%s is not temporary any more" -msgstr "Server %s%s%s již není dočasný\n" - -#, fuzzy, c-format msgid "" "%s%s: you can not delete server \"%s\" because you are connected to. Try \"/" "disconnect %s\" before." @@ -2340,11 +2324,12 @@ msgstr "" "[-all [-nojoin] | jméno_serveru [jméno_serveru ...] [-nojoin] | hostname [-" "port port] [-ipv6] [-ssl]]" +#, fuzzy msgid "" " -all: connect to all servers\n" "servername: internal server name to connect\n" " -nojoin: do not join any channel (even if autojoin is enabled on server)\n" -" hostname: hostname to connect, creating temporary server\n" +" hostname: hostname to connect\n" " port: port for server (integer, default is 6667)\n" " ipv6: use IPv6 protocol\n" " ssl: use SSL protocol" @@ -2780,10 +2765,8 @@ msgstr "vypíše, přídá nebo odebere servery" #, fuzzy msgid "" "[list [servername]] | [listfull [servername]] | [add servername hostname[/" -"port] [-temp] [-auto | -noauto] [-ipv6] [-ssl] [-pwd password] [-nicks nick1," -"nick2,...] [-username username] [-realname realname] [-autojoin channel[," -"channel]] ] | [copy servername newservername] | [rename servername " -"newservername] | [keep servername] | [del servername]" +"port] [-auto | -noauto] [-ipv6] [-ssl]] | [copy servername newservername] | " +"[rename servername newservername] | [del servername]" msgstr "" "[list [jméno_serveru]] | [listfull [jméno_serveru]] | [add jméno_serveru " "jméno_hosta [-port port] [-temp] [-auto | -noauto] [-ipv6] [-ssl] [-pwd " @@ -2801,21 +2784,25 @@ msgid "" "servername: server name, for internal and display use\n" " hostname: name or IP address of server, with optional port (default: " "6667)\n" -" temp: create temporary server (not saved in config file)\n" " auto: automatically connect to server when WeeChat starts\n" " noauto: do not connect to server when WeeChat starts (default)\n" " ipv6: use IPv6 protocol\n" " ssl: use SSL protocol\n" -" password: password for server\n" -"nick1,2,..: nicknames for server\n" -" username: user name\n" -" realname: real name of user\n" " copy: duplicate a server\n" " rename: rename a server\n" -" keep: keep server in config file (for temporary servers only)\n" " del: delete a server\n" " deloutq: delete messages out queue for all servers (all messages WeeChat " -"is currently sending)" +"is currently sending)\n" +"\n" +"Examples:\n" +" /server listfull\n" +" /server add oftc irc.oftc.net/6697 -ssl\n" +" /server add oftc6 irc6.oftc.net/6697 -ipv6 -ssl\n" +" /server add freenode2 chat.eu.freenode.net/6697,chat.us.freenode.net/6667\n" +" /server copy oftc oftcbis\n" +" /server rename oftc newoftc\n" +" /server del freenode\n" +" /server deloutq" msgstr "" " list: vypsat servery (pokud nejsou uvedeny žádné parametry bude " "vypsán tento seznam)\n" @@ -3236,12 +3223,6 @@ msgstr "na" msgid "off" msgstr "off" -msgid " (temporary server, will not be saved)" -msgstr " (dočasný server, nebude uložen)" - -msgid " (temporary)" -msgstr " (dočasný)" - #, fuzzy msgid "channel" msgid_plural "channels" @@ -3851,6 +3832,10 @@ msgstr "%s \"%s\" příkaz obdržen bez hosta\n" msgid "%s%s: error when allocating new server" msgstr "%s nemůžu přidělit nový server\n" +#, fuzzy, c-format +msgid "%s%s: error creating new server \"%s\"" +msgstr "%s nedostatek paměti pro infobar zprávu\n" + #, c-format msgid "" "%s%s: error sending data to IRC server: null pointer (please report problem " @@ -4704,6 +4689,28 @@ msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s chybí argument pro volbu \"%s\"\n" #, fuzzy +#~ msgid "%s: server %s%s%s created (temporary server, NOT SAVED!)" +#~ msgstr "Server %s%s%s vytvořen (dočasný server, NEUKLÁDÁ SE!)\n" + +#, fuzzy +#~ msgid "%s%s: nick \"%s\" not found for \"%s\" command" +#~ msgstr "%s přezdívka \"%s\" nebyla nalezena pro příkaz \"%s\"\n" + +#, fuzzy +#~ msgid "%s%s: server \"%s\" is not a temporary server" +#~ msgstr "%s server \"%s\" není dočasným serverem\n" + +#, fuzzy +#~ msgid "%s: server %s%s%s is not temporary any more" +#~ msgstr "Server %s%s%s již není dočasný\n" + +#~ msgid " (temporary server, will not be saved)" +#~ msgstr " (dočasný server, nebude uložen)" + +#~ msgid " (temporary)" +#~ msgstr " (dočasný)" + +#, fuzzy #~ msgid "write of infolist type 'integer'" #~ msgstr " . typ: celočíselný\n" @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-08-13 16:43+0200\n" +"POT-Creation-Date: 2008-08-22 12:08+0200\n" "PO-Revision-Date: 2007-09-06 12:44+0200\n" "Last-Translator: Thomas Schuetz <i18n@internet-villa.de>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -2050,7 +2050,7 @@ msgstr "%s Fehler beim Lesen vom FIFO, FIFO wird geschlossen\n" # ??? #, fuzzy, c-format -msgid "%s%s: invalid syntax for IRC server ('%s'), ignored" +msgid "%s%s: error with IRC server from URL (\"s\"), ignored" msgstr "%s ungültige Syntax für IRC-Server ('%s'), ignoriert\n" #, fuzzy, c-format @@ -2087,8 +2087,8 @@ msgid "%s%s: missing argument for \"%s\" option" msgstr "%s fehlende Argumente für die \"--dir\"-Option\n" #, fuzzy, c-format -msgid "%s: server %s%s%s created (temporary server, NOT SAVED!)" -msgstr "%s Server \"%s\" nicht gefunden\n" +msgid "%s: server %s%s%s created" +msgstr "Server %s%s%s angelegt\n" #, fuzzy, c-format msgid "%s%s: unable to create server \"%s\"" @@ -2130,10 +2130,6 @@ msgstr "" "ausgeführt werden\n" #, fuzzy, c-format -msgid "%s%s: nick \"%s\" not found for \"%s\" command" -msgstr "%s Nickname \"%s\" für den \"%s\"-Befehl nicht gefunden\n" - -#, fuzzy, c-format msgid "%s%s: cannot create new private buffer \"%s\"" msgstr "%s kann kein neues privates Fenster \"%s\" erzeugen\n" @@ -2172,10 +2168,6 @@ msgstr "" "werden!\n" #, fuzzy, c-format -msgid "%s: server %s%s%s created" -msgstr "Server %s%s%s angelegt\n" - -#, fuzzy, c-format msgid "%s%s: unable to create server" msgstr "%s kann den Server nicht anlegen\n" @@ -2184,14 +2176,6 @@ msgid "%s: server %s%s%s has been copied to %s%s" msgstr "Server %s%s%s wurde gelöscht\n" #, fuzzy, c-format -msgid "%s%s: server \"%s\" is not a temporary server" -msgstr "%s Server \"%s\" nicht gefunden\n" - -#, fuzzy, c-format -msgid "%s: server %s%s%s is not temporary any more" -msgstr "%s Server \"%s\" nicht gefunden\n" - -#, fuzzy, c-format msgid "" "%s%s: you can not delete server \"%s\" because you are connected to. Try \"/" "disconnect %s\" before." @@ -2286,7 +2270,7 @@ msgid "" " -all: connect to all servers\n" "servername: internal server name to connect\n" " -nojoin: do not join any channel (even if autojoin is enabled on server)\n" -" hostname: hostname to connect, creating temporary server\n" +" hostname: hostname to connect\n" " port: port for server (integer, default is 6667)\n" " ipv6: use IPv6 protocol\n" " ssl: use SSL protocol" @@ -2716,10 +2700,8 @@ msgstr "Auflisten, Hinzufügen oder Entfernen von Servern" #, fuzzy msgid "" "[list [servername]] | [listfull [servername]] | [add servername hostname[/" -"port] [-temp] [-auto | -noauto] [-ipv6] [-ssl] [-pwd password] [-nicks nick1," -"nick2,...] [-username username] [-realname realname] [-autojoin channel[," -"channel]] ] | [copy servername newservername] | [rename servername " -"newservername] | [keep servername] | [del servername]" +"port] [-auto | -noauto] [-ipv6] [-ssl]] | [copy servername newservername] | " +"[rename servername newservername] | [del servername]" msgstr "" "[Servername] | [Servername Hostname Port [-auto | -noauto] [-ipv6] [-ssl] [-" "pwd Passwort] [-nicks Nick1 Nick2 Nick3] [-username Benutzername] [-realname " @@ -2733,21 +2715,25 @@ msgid "" "servername: server name, for internal and display use\n" " hostname: name or IP address of server, with optional port (default: " "6667)\n" -" temp: create temporary server (not saved in config file)\n" " auto: automatically connect to server when WeeChat starts\n" " noauto: do not connect to server when WeeChat starts (default)\n" " ipv6: use IPv6 protocol\n" " ssl: use SSL protocol\n" -" password: password for server\n" -"nick1,2,..: nicknames for server\n" -" username: user name\n" -" realname: real name of user\n" " copy: duplicate a server\n" " rename: rename a server\n" -" keep: keep server in config file (for temporary servers only)\n" " del: delete a server\n" " deloutq: delete messages out queue for all servers (all messages WeeChat " -"is currently sending)" +"is currently sending)\n" +"\n" +"Examples:\n" +" /server listfull\n" +" /server add oftc irc.oftc.net/6697 -ssl\n" +" /server add oftc6 irc6.oftc.net/6697 -ipv6 -ssl\n" +" /server add freenode2 chat.eu.freenode.net/6697,chat.us.freenode.net/6667\n" +" /server copy oftc oftcbis\n" +" /server rename oftc newoftc\n" +" /server del freenode\n" +" /server deloutq" msgstr "" "Servername: anzuzeigender Servername\n" " Hostname: Name oder IP-Adresse des Servers\n" @@ -3152,12 +3138,6 @@ msgstr "an" msgid "off" msgstr "aus" -msgid " (temporary server, will not be saved)" -msgstr " (temporärer Server, wird nicht gespeichert)" - -msgid " (temporary)" -msgstr "" - #, fuzzy msgid "channel" msgid_plural "channels" @@ -3767,6 +3747,10 @@ msgstr "%s \"%s\"-Befehl empfangen ohne Host\n" msgid "%s%s: error when allocating new server" msgstr "%s Neuer Server konnte nicht alloziert werden\n" +#, fuzzy, c-format +msgid "%s%s: error creating new server \"%s\"" +msgstr "%s nicht genügend Speicher für Infobar-Nachricht\n" + #, c-format msgid "" "%s%s: error sending data to IRC server: null pointer (please report problem " @@ -4602,6 +4586,25 @@ msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s fehlende Argumente für die \"--dir\"-Option\n" #, fuzzy +#~ msgid "%s: server %s%s%s created (temporary server, NOT SAVED!)" +#~ msgstr "%s Server \"%s\" nicht gefunden\n" + +#, fuzzy +#~ msgid "%s%s: nick \"%s\" not found for \"%s\" command" +#~ msgstr "%s Nickname \"%s\" für den \"%s\"-Befehl nicht gefunden\n" + +#, fuzzy +#~ msgid "%s%s: server \"%s\" is not a temporary server" +#~ msgstr "%s Server \"%s\" nicht gefunden\n" + +#, fuzzy +#~ msgid "%s: server %s%s%s is not temporary any more" +#~ msgstr "%s Server \"%s\" nicht gefunden\n" + +#~ msgid " (temporary server, will not be saved)" +#~ msgstr " (temporärer Server, wird nicht gespeichert)" + +#, fuzzy #~ msgid "write of infolist type 'integer'" #~ msgstr " . Typ: Ganzzahl\n" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-08-13 16:43+0200\n" +"POT-Creation-Date: 2008-08-22 12:08+0200\n" "PO-Revision-Date: 2007-09-19 12:09+0200\n" "Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1117,8 +1117,8 @@ msgstr "la cadena mostrada tras la finalización de los nombres de usuario" #, fuzzy msgid "use a marker (line or char) on buffers to show first unread line" msgstr "" -"usar un marcador en los servidores/canales para mostrar la primera lÃnea sin " -"leer" +"usar un marcador en los servidores/canales para mostrar la primera lÃnea " +"sin leer" #, fuzzy msgid "save configuration file on exit" @@ -2028,7 +2028,7 @@ msgid "%s%s: error opening file, closing it" msgstr "%s error al leer la tuberÃa FIFO, cerrándola\n" #, fuzzy, c-format -msgid "%s%s: invalid syntax for IRC server ('%s'), ignored" +msgid "%s%s: error with IRC server from URL (\"s\"), ignored" msgstr "%s sintaxis inválida para el servidor IRC ('%s'), ignorado\n" #, fuzzy, c-format @@ -2065,8 +2065,8 @@ msgid "%s%s: missing argument for \"%s\" option" msgstr "%s falta un argumento para la opción --dir\n" #, fuzzy, c-format -msgid "%s: server %s%s%s created (temporary server, NOT SAVED!)" -msgstr "%s servidor \"%s\" no encontrado\n" +msgid "%s: server %s%s%s created" +msgstr "Servidor %s%s%s creado\n" #, fuzzy, c-format msgid "%s%s: unable to create server \"%s\"" @@ -2107,10 +2107,6 @@ msgstr "" "%s el comando \"%s\" sólo puede ser ejecutado en una ventana de canal\n" #, fuzzy, c-format -msgid "%s%s: nick \"%s\" not found for \"%s\" command" -msgstr "%s usuario \"%s\" no encontrado para el comando \"%s\"\n" - -#, fuzzy, c-format msgid "%s%s: cannot create new private buffer \"%s\"" msgstr "%s no es posible crear una nueva ventana privada \"%s\"\n" @@ -2147,10 +2143,6 @@ msgid "%s%s: server \"%s\" already exists, can't create it!" msgstr "%s el servidor \"%s\" ya existe, ¡no se puede crear!\n" #, fuzzy, c-format -msgid "%s: server %s%s%s created" -msgstr "Servidor %s%s%s creado\n" - -#, fuzzy, c-format msgid "%s%s: unable to create server" msgstr "%s no es posible crear el servidor\n" @@ -2159,14 +2151,6 @@ msgid "%s: server %s%s%s has been copied to %s%s" msgstr "El servidor %s%s%s ha sido borrado\n" #, fuzzy, c-format -msgid "%s%s: server \"%s\" is not a temporary server" -msgstr "%s servidor \"%s\" no encontrado\n" - -#, fuzzy, c-format -msgid "%s: server %s%s%s is not temporary any more" -msgstr "%s servidor \"%s\" no encontrado\n" - -#, fuzzy, c-format msgid "" "%s%s: you can not delete server \"%s\" because you are connected to. Try \"/" "disconnect %s\" before." @@ -2264,7 +2248,7 @@ msgid "" " -all: connect to all servers\n" "servername: internal server name to connect\n" " -nojoin: do not join any channel (even if autojoin is enabled on server)\n" -" hostname: hostname to connect, creating temporary server\n" +" hostname: hostname to connect\n" " port: port for server (integer, default is 6667)\n" " ipv6: use IPv6 protocol\n" " ssl: use SSL protocol" @@ -2704,10 +2688,8 @@ msgstr "lista, añde o elimina servidores" #, fuzzy msgid "" "[list [servername]] | [listfull [servername]] | [add servername hostname[/" -"port] [-temp] [-auto | -noauto] [-ipv6] [-ssl] [-pwd password] [-nicks nick1," -"nick2,...] [-username username] [-realname realname] [-autojoin channel[," -"channel]] ] | [copy servername newservername] | [rename servername " -"newservername] | [keep servername] | [del servername]" +"port] [-auto | -noauto] [-ipv6] [-ssl]] | [copy servername newservername] | " +"[rename servername newservername] | [del servername]" msgstr "" "[nombre_de_servidor] | [nombre_de_servidor nombre/IP puerto [-auto | -" "noauto] [-ipv6] [-ssl] [-pwd contraseña] [-nicks alias1 alias2 alias3] [-" @@ -2722,21 +2704,25 @@ msgid "" "servername: server name, for internal and display use\n" " hostname: name or IP address of server, with optional port (default: " "6667)\n" -" temp: create temporary server (not saved in config file)\n" " auto: automatically connect to server when WeeChat starts\n" " noauto: do not connect to server when WeeChat starts (default)\n" " ipv6: use IPv6 protocol\n" " ssl: use SSL protocol\n" -" password: password for server\n" -"nick1,2,..: nicknames for server\n" -" username: user name\n" -" realname: real name of user\n" " copy: duplicate a server\n" " rename: rename a server\n" -" keep: keep server in config file (for temporary servers only)\n" " del: delete a server\n" " deloutq: delete messages out queue for all servers (all messages WeeChat " -"is currently sending)" +"is currently sending)\n" +"\n" +"Examples:\n" +" /server listfull\n" +" /server add oftc irc.oftc.net/6697 -ssl\n" +" /server add oftc6 irc6.oftc.net/6697 -ipv6 -ssl\n" +" /server add freenode2 chat.eu.freenode.net/6697,chat.us.freenode.net/6667\n" +" /server copy oftc oftcbis\n" +" /server rename oftc newoftc\n" +" /server del freenode\n" +" /server deloutq" msgstr "" " nombre_de_servidor: nombre del servidor, para uso interno y para mostrar\n" "nombre_de_anfitrión: nombre o dirección IP del servidor\n" @@ -3146,12 +3132,6 @@ msgstr "activo" msgid "off" msgstr "inactivo" -msgid " (temporary server, will not be saved)" -msgstr " (servidor temporal, no será guardado)" - -msgid " (temporary)" -msgstr "" - #, fuzzy msgid "channel" msgid_plural "channels" @@ -3767,6 +3747,11 @@ msgstr "%s comando \"%s\" recibido sin host \n" msgid "%s%s: error when allocating new server" msgstr "%s no ha sido posible crear un nuevo servidor\n" +#, fuzzy, c-format +msgid "%s%s: error creating new server \"%s\"" +msgstr "" +"No hay suficiente memoria para el mensaje de la barra de información\n" + #, c-format msgid "" "%s%s: error sending data to IRC server: null pointer (please report problem " @@ -4610,6 +4595,25 @@ msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s falta un argumento para la opción --dir\n" #, fuzzy +#~ msgid "%s: server %s%s%s created (temporary server, NOT SAVED!)" +#~ msgstr "%s servidor \"%s\" no encontrado\n" + +#, fuzzy +#~ msgid "%s%s: nick \"%s\" not found for \"%s\" command" +#~ msgstr "%s usuario \"%s\" no encontrado para el comando \"%s\"\n" + +#, fuzzy +#~ msgid "%s%s: server \"%s\" is not a temporary server" +#~ msgstr "%s servidor \"%s\" no encontrado\n" + +#, fuzzy +#~ msgid "%s: server %s%s%s is not temporary any more" +#~ msgstr "%s servidor \"%s\" no encontrado\n" + +#~ msgid " (temporary server, will not be saved)" +#~ msgstr " (servidor temporal, no será guardado)" + +#, fuzzy #~ msgid "write of infolist type 'integer'" #~ msgstr " . tipo: entero\n" @@ -5553,8 +5557,8 @@ msgstr "%s falta un argumento para la opción --dir\n" #~ "maximum number of lines in history for one server/channel/private window " #~ "(0 = unlimited)" #~ msgstr "" -#~ "número máximo de lÃneas en el histórico para un servidor/canal/privado " -#~ "(0 = ilimitado)" +#~ "número máximo de lÃneas en el histórico para un servidor/canal/" +#~ "privado (0 = ilimitado)" #, fuzzy #~ msgid "log messages from plugins" @@ -5748,8 +5752,8 @@ msgstr "%s falta un argumento para la opción --dir\n" #~ "max size for aligning nick and other messages (should be >= to " #~ "look_align_size)" #~ msgstr "" -#~ "tamaño máximo para la alineación de nick y otros mensajes (deberÃa ser " -#~ ">= a look_align_size)" +#~ "tamaño máximo para la alineación de nick y otros mensajes (deberÃa " +#~ "ser >= a look_align_size)" #~ msgid "server name not found" #~ msgstr "nombre de servidor no encontrado" @@ -6524,7 +6528,8 @@ msgstr "%s falta un argumento para la opción --dir\n" #~ msgid "color for chan owner symbol (specific to unrealircd)" #~ msgstr "" -#~ "color para el sÃmbolo de propietario de canal (especificado en unrealircd)" +#~ "color para el sÃmbolo de propietario de canal (especificado en " +#~ "unrealircd)" #~ msgid "color for chan admin symbol" #~ msgstr "color para el sÃmbolo de administrador de canal" @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-08-13 16:43+0200\n" -"PO-Revision-Date: 2008-08-20 15:20+0200\n" +"POT-Creation-Date: 2008-08-22 12:08+0200\n" +"PO-Revision-Date: 2008-08-22 12:09+0200\n" "Last-Translator: FlashCode <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "MIME-Version: 1.0\n" @@ -2028,8 +2028,8 @@ msgid "%s%s: error opening file, closing it" msgstr "%s%s: erreur d'ouverture du fichier, fermeture" #, c-format -msgid "%s%s: invalid syntax for IRC server ('%s'), ignored" -msgstr "%s%s: syntaxe invalide pour le serveur IRC ('%s'), ignoré" +msgid "%s%s: error with IRC server from URL (\"s\"), ignored" +msgstr "%s%s: erreur avec le serveur IRC de l'URL (\"%s\"), ignoré" #, c-format msgid "%s%s: cannot allocate new channel" @@ -2065,8 +2065,8 @@ msgid "%s%s: missing argument for \"%s\" option" msgstr "%s%s: paramètre manquant pour l'option \"%s\"" #, c-format -msgid "%s: server %s%s%s created (temporary server, NOT SAVED!)" -msgstr "%s: serveur %s%s%s créé (serveur temporaire, NON SAUVE !)" +msgid "%s: server %s%s%s created" +msgstr "%s: serveur %s%s%s créé" #, c-format msgid "%s%s: unable to create server \"%s\"" @@ -2109,10 +2109,6 @@ msgstr "" "ou privé" #, c-format -msgid "%s%s: nick \"%s\" not found for \"%s\" command" -msgstr "%s%s: pseudo \"%s\" non trouvé pour la commande \"%s\"" - -#, c-format msgid "%s%s: cannot create new private buffer \"%s\"" msgstr "%s%s: impossible de créer le tampon privé \"%s\"" @@ -2147,10 +2143,6 @@ msgid "%s%s: server \"%s\" already exists, can't create it!" msgstr "%s%s: le serveur \"%s\" existe déjà, impossible de le créer !" #, c-format -msgid "%s: server %s%s%s created" -msgstr "%s: serveur %s%s%s créé" - -#, c-format msgid "%s%s: unable to create server" msgstr "%s%s: impossible de créer le serveur" @@ -2159,14 +2151,6 @@ msgid "%s: server %s%s%s has been copied to %s%s" msgstr "%s: le serveur %s%s%s a été copié vers %s%s" #, c-format -msgid "%s%s: server \"%s\" is not a temporary server" -msgstr "%s%s: le serveur \"%s\" n'est pas un serveur temporaire" - -#, c-format -msgid "%s: server %s%s%s is not temporary any more" -msgstr "%s: le serveur %s%s%s n'est plus temporaire" - -#, c-format msgid "" "%s%s: you can not delete server \"%s\" because you are connected to. Try \"/" "disconnect %s\" before." @@ -2263,7 +2247,7 @@ msgid "" " -all: connect to all servers\n" "servername: internal server name to connect\n" " -nojoin: do not join any channel (even if autojoin is enabled on server)\n" -" hostname: hostname to connect, creating temporary server\n" +" hostname: hostname to connect\n" " port: port for server (integer, default is 6667)\n" " ipv6: use IPv6 protocol\n" " ssl: use SSL protocol" @@ -2272,7 +2256,7 @@ msgstr "" "nom_serveur: nom du serveur pour se connecter\n" " -nojoin: ne rejoindre aucun canal (même si l'autojoin est activé pour le " "serveur)\n" -" nom/IP: nom/IP pour se connecter, en créant un serveur temporaire\n" +" nom/IP: nom/IP pour se connecter\n" " port: port pour le serveur (nombre entier, 6667 par défaut)\n" " ipv6: utiliser le protocole IPv6\n" " ssl: utiliser le protocole SSL" @@ -2695,16 +2679,13 @@ msgstr "liste, ajoute ou retire des serveurs" msgid "" "[list [servername]] | [listfull [servername]] | [add servername hostname[/" -"port] [-temp] [-auto | -noauto] [-ipv6] [-ssl] [-pwd password] [-nicks nick1," -"nick2,...] [-username username] [-realname realname] [-autojoin channel[," -"channel]] ] | [copy servername newservername] | [rename servername " -"newservername] | [keep servername] | [del servername]" +"port] [-auto | -noauto] [-ipv6] [-ssl]] | [copy servername newservername] | " +"[rename servername newservername] | [del servername]" msgstr "" "[list [nom_serveur]] | [listfull [nom_serveur]] | [add nom_serveur nom[/" -"port] [-temp] [-auto | -noauto] [-ipv6] [-ssl] [-pwd mot_de_passe] [-nicks " -"pseudo1,pseudo2,...] [-username nom_utilisateur] [-realname nom_réel] [-" -"autojoin canal[,canal]] ] | [copy nom_serveur nouveau_nom_serveur] | [rename " -"nom_serveur nouveau_nom_serveur] | [keep nom_serveur] | [del nom_serveur]" +"port] [-temp] [-auto | -noauto] [-ipv6] [-ssl]] | [copy nom_serveur " +"nouveau_nom_serveur] | [rename nom_serveur nouveau_nom_serveur] | [del " +"nom_serveur]" msgid "" " list: list servers (no parameter implies this list)\n" @@ -2713,49 +2694,53 @@ msgid "" "servername: server name, for internal and display use\n" " hostname: name or IP address of server, with optional port (default: " "6667)\n" -" temp: create temporary server (not saved in config file)\n" " auto: automatically connect to server when WeeChat starts\n" " noauto: do not connect to server when WeeChat starts (default)\n" " ipv6: use IPv6 protocol\n" " ssl: use SSL protocol\n" -" password: password for server\n" -"nick1,2,..: nicknames for server\n" -" username: user name\n" -" realname: real name of user\n" " copy: duplicate a server\n" " rename: rename a server\n" -" keep: keep server in config file (for temporary servers only)\n" " del: delete a server\n" " deloutq: delete messages out queue for all servers (all messages WeeChat " -"is currently sending)" -msgstr "" -" list: afficher les serveurs (pas de paramètre implique cette " -"liste)\n" -" listfull: afficher les serveurs avec de l'info détaillée pour chaque\n" -" add: créer un nouveau serveur\n" -" nom_serveur: nom du serveur, pour usage interne et affichage\n" -" nom: nom ou adresse IP du serveur avec port en option (defaut: " +"is currently sending)\n" +"\n" +"Examples:\n" +" /server listfull\n" +" /server add oftc irc.oftc.net/6697 -ssl\n" +" /server add oftc6 irc6.oftc.net/6697 -ipv6 -ssl\n" +" /server add freenode2 chat.eu.freenode.net/6697,chat.us.freenode.net/6667\n" +" /server copy oftc oftcbis\n" +" /server rename oftc newoftc\n" +" /server del freenode\n" +" /server deloutq" +msgstr "" +" list: afficher les serveurs (pas de paramètre implique cette liste)\n" +" listfull: afficher les serveurs avec de l'info détaillée pour chaque\n" +" add: créer un nouveau serveur\n" +"nom_serveur: nom du serveur, pour usage interne et affichage\n" +" nom: nom ou adresse IP du serveur avec port en option (defaut: " "6667)\n" -" temp: créer un serveur temporaire (non sauvegardé dans le fichier " -"de configuration)\n" -" auto: se connecter automatiquement au serveur quand WeeChat " -"démarre\n" -" noauto: ne pas se connecter au serveur quand WeeChat démarre (par " +" auto: se connecter automatiquement au serveur quand WeeChat démarre\n" +" noauto: ne pas se connecter au serveur quand WeeChat démarre (par " "défaut)\n" -" ipv6: utiliser le protocole IPv6\n" -" ssl: utiliser le protocole SSL\n" -" mot_de_passe: mot de passe pour le serveur\n" -" pseudo1,2,...: pseudos pour le serveur\n" -"nom_utilisateur: nom d'utilisateur\n" -" nom_réel: nom réel de l'utilisateur\n" -" copy: dupliquer un serveur\n" -" rename: renommer un serveur\n" -" keep: garder le serveur dans le fichier de configuration (pour " -"les serveurs temporaires seulement)\n" -" del: supprimer un serveur\n" -" deloutq: supprimer la file d'attente des messages sortants pour tous " -"les serveurs (tous les messages que WeeChat est actuellement en train " -"d'envoyer)" +" ipv6: utiliser le protocole IPv6\n" +" ssl: utiliser le protocole SSL\n" +" copy: dupliquer un serveur\n" +" rename: renommer un serveur\n" +" del: supprimer un serveur\n" +" deloutq: supprimer la file d'attente des messages sortants pour tous les " +"serveurs (tous les messages que WeeChat est actuellement en train " +"d'envoyer)\n" +"\n" +"Exemples :\n" +" /server listfull\n" +" /server add oftc irc.oftc.net/6697 -ssl\n" +" /server add oftc6 irc6.oftc.net/6697 -ipv6 -ssl\n" +" /server add freenode2 chat.eu.freenode.net/6697,chat.us.freenode.net/6667\n" +" /server copy oftc oftcbis\n" +" /server rename oftc newoftc\n" +" /server del freenode\n" +" /server deloutq" msgid "list services currently connected to the network" msgstr "lister les services actuellement connectés au réseau" @@ -3148,12 +3133,6 @@ msgstr "activé" msgid "off" msgstr "désactivé" -msgid " (temporary server, will not be saved)" -msgstr " (serveur temporaire, ne sera pas sauvegardé)" - -msgid " (temporary)" -msgstr " (temporaire)" - msgid "channel" msgid_plural "channels" msgstr[0] "canal" @@ -3767,6 +3746,10 @@ msgid "%s%s: error when allocating new server" msgstr "%s%s: impossible d'allouer un nouveau serveur" #, c-format +msgid "%s%s: error creating new server \"%s\"" +msgstr "%s%s: erreur de création du serveur \"%s\"" + +#, c-format msgid "" "%s%s: error sending data to IRC server: null pointer (please report problem " "to developers)" @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-08-13 16:43+0200\n" +"POT-Creation-Date: 2008-08-22 12:08+0200\n" "PO-Revision-Date: 2007-10-10 18:07+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -2056,7 +2056,7 @@ msgid "%s%s: error opening file, closing it" msgstr "%s hiba a FIFO cső olvasása közben, bezárás\n" #, fuzzy, c-format -msgid "%s%s: invalid syntax for IRC server ('%s'), ignored" +msgid "%s%s: error with IRC server from URL (\"s\"), ignored" msgstr "%s érvénytelen szintaxis az IRC szervernek ('%s'), mellőzve\n" #, fuzzy, c-format @@ -2092,8 +2092,8 @@ msgid "%s%s: missing argument for \"%s\" option" msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n" #, fuzzy, c-format -msgid "%s: server %s%s%s created (temporary server, NOT SAVED!)" -msgstr "A(z) %s%s%s szerver létrehozva (ideiglenes szerver, NINCS MENTVE!)\n" +msgid "%s: server %s%s%s created" +msgstr "A %s%s%s szerver létrehozva\n" #, fuzzy, c-format msgid "%s%s: unable to create server \"%s\"" @@ -2133,10 +2133,6 @@ msgid "" msgstr "%s \"%s\" parancs csak a szobaablakban futtatható\n" #, fuzzy, c-format -msgid "%s%s: nick \"%s\" not found for \"%s\" command" -msgstr "%s név \"%s\" nem található a \"%s\" parancshoz\n" - -#, fuzzy, c-format msgid "%s%s: cannot create new private buffer \"%s\"" msgstr "%s nem sikerült új privát ablakot nyitni \"%s\"\n" @@ -2173,10 +2169,6 @@ msgid "%s%s: server \"%s\" already exists, can't create it!" msgstr "%s a \"%s\" szerver már létezik, nem hozhatja létre!\n" #, fuzzy, c-format -msgid "%s: server %s%s%s created" -msgstr "A %s%s%s szerver létrehozva\n" - -#, fuzzy, c-format msgid "%s%s: unable to create server" msgstr "%s nem sikerült a szervert létrehozni\n" @@ -2185,14 +2177,6 @@ msgid "%s: server %s%s%s has been copied to %s%s" msgstr "A %s%s%s szerver másolva lett %s%s néven\n" #, fuzzy, c-format -msgid "%s%s: server \"%s\" is not a temporary server" -msgstr "%s a \"%s\" szerver nem ideiglenes\n" - -#, fuzzy, c-format -msgid "%s: server %s%s%s is not temporary any more" -msgstr "A(z) %s%s%s szerver mostantól nem ideiglenes\n" - -#, fuzzy, c-format msgid "" "%s%s: you can not delete server \"%s\" because you are connected to. Try \"/" "disconnect %s\" before." @@ -2285,11 +2269,12 @@ msgstr "" "[-all [-nojoin] | szervernév [szervernév ...] [-nojoin] | gépnév [-port " "port] [-ipv6] [-ssl]]" +#, fuzzy msgid "" " -all: connect to all servers\n" "servername: internal server name to connect\n" " -nojoin: do not join any channel (even if autojoin is enabled on server)\n" -" hostname: hostname to connect, creating temporary server\n" +" hostname: hostname to connect\n" " port: port for server (integer, default is 6667)\n" " ipv6: use IPv6 protocol\n" " ssl: use SSL protocol" @@ -2730,10 +2715,8 @@ msgstr "szerverek listázása, hozzáadása vagy eltávolítása" #, fuzzy msgid "" "[list [servername]] | [listfull [servername]] | [add servername hostname[/" -"port] [-temp] [-auto | -noauto] [-ipv6] [-ssl] [-pwd password] [-nicks nick1," -"nick2,...] [-username username] [-realname realname] [-autojoin channel[," -"channel]] ] | [copy servername newservername] | [rename servername " -"newservername] | [keep servername] | [del servername]" +"port] [-auto | -noauto] [-ipv6] [-ssl]] | [copy servername newservername] | " +"[rename servername newservername] | [del servername]" msgstr "" "[list [szervernév]] | [listfull [szervernév]] | [add szervernév gépnév [-" "port port] [-temp] [-auto | -noauto] [-ipv6] [-ssl] [-pwd jelszó] [-nicks " @@ -2749,21 +2732,25 @@ msgid "" "servername: server name, for internal and display use\n" " hostname: name or IP address of server, with optional port (default: " "6667)\n" -" temp: create temporary server (not saved in config file)\n" " auto: automatically connect to server when WeeChat starts\n" " noauto: do not connect to server when WeeChat starts (default)\n" " ipv6: use IPv6 protocol\n" " ssl: use SSL protocol\n" -" password: password for server\n" -"nick1,2,..: nicknames for server\n" -" username: user name\n" -" realname: real name of user\n" " copy: duplicate a server\n" " rename: rename a server\n" -" keep: keep server in config file (for temporary servers only)\n" " del: delete a server\n" " deloutq: delete messages out queue for all servers (all messages WeeChat " -"is currently sending)" +"is currently sending)\n" +"\n" +"Examples:\n" +" /server listfull\n" +" /server add oftc irc.oftc.net/6697 -ssl\n" +" /server add oftc6 irc6.oftc.net/6697 -ipv6 -ssl\n" +" /server add freenode2 chat.eu.freenode.net/6697,chat.us.freenode.net/6667\n" +" /server copy oftc oftcbis\n" +" /server rename oftc newoftc\n" +" /server del freenode\n" +" /server deloutq" msgstr "" " list: szerverek listázása (paraméter nélkül is ez a parancs " "hívódik meg)\n" @@ -3177,12 +3164,6 @@ msgstr "be" msgid "off" msgstr "ki" -msgid " (temporary server, will not be saved)" -msgstr " (átmeneti szerver, nem lesz mentve)" - -msgid " (temporary)" -msgstr " (átmeneti)" - #, fuzzy msgid "channel" msgid_plural "channels" @@ -3786,6 +3767,10 @@ msgstr "%s \"%s\" parancs érkezett hoszt megadása nélkül\n" msgid "%s%s: error when allocating new server" msgstr "%s az új szerver lefoglalása sikertelen\n" +#, fuzzy, c-format +msgid "%s%s: error creating new server \"%s\"" +msgstr "%s nincs elég memória az információs pult üzenethez\n" + #, c-format msgid "" "%s%s: error sending data to IRC server: null pointer (please report problem " @@ -4621,6 +4606,29 @@ msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n" #, fuzzy +#~ msgid "%s: server %s%s%s created (temporary server, NOT SAVED!)" +#~ msgstr "" +#~ "A(z) %s%s%s szerver létrehozva (ideiglenes szerver, NINCS MENTVE!)\n" + +#, fuzzy +#~ msgid "%s%s: nick \"%s\" not found for \"%s\" command" +#~ msgstr "%s név \"%s\" nem található a \"%s\" parancshoz\n" + +#, fuzzy +#~ msgid "%s%s: server \"%s\" is not a temporary server" +#~ msgstr "%s a \"%s\" szerver nem ideiglenes\n" + +#, fuzzy +#~ msgid "%s: server %s%s%s is not temporary any more" +#~ msgstr "A(z) %s%s%s szerver mostantól nem ideiglenes\n" + +#~ msgid " (temporary server, will not be saved)" +#~ msgstr " (átmeneti szerver, nem lesz mentve)" + +#~ msgid " (temporary)" +#~ msgstr " (átmeneti)" + +#, fuzzy #~ msgid "write of infolist type 'integer'" #~ msgstr " . típus: szám\n" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-08-13 16:43+0200\n" +"POT-Creation-Date: 2008-08-22 12:08+0200\n" "PO-Revision-Date: 2007-09-06 12:44+0200\n" "Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -2061,7 +2061,7 @@ msgid "%s%s: error opening file, closing it" msgstr "%s ошибка чтения FIFO pipe, закрываю его\n" #, fuzzy, c-format -msgid "%s%s: invalid syntax for IRC server ('%s'), ignored" +msgid "%s%s: error with IRC server from URL (\"s\"), ignored" msgstr "%s некорректный синтаксис IRC сервра ('%s'), игнорируется\n" #, fuzzy, c-format @@ -2097,8 +2097,8 @@ msgid "%s%s: missing argument for \"%s\" option" msgstr "%s нет аргумента для параметра \"%s\"\n" #, fuzzy, c-format -msgid "%s: server %s%s%s created (temporary server, NOT SAVED!)" -msgstr "Сервер %s%s%s создан (временный сервер, НЕ СОХРАНЁН!\n" +msgid "%s: server %s%s%s created" +msgstr "Сервер %s%s%s создан\n" #, fuzzy, c-format msgid "%s%s: unable to create server \"%s\"" @@ -2139,10 +2139,6 @@ msgstr "" "%s \"%s\" команда может быть выполнена только в буфере канала или привата\n" #, fuzzy, c-format -msgid "%s%s: nick \"%s\" not found for \"%s\" command" -msgstr "%s ник \"%s\" не найден для команды \"%s\"\n" - -#, fuzzy, c-format msgid "%s%s: cannot create new private buffer \"%s\"" msgstr "%s невозможно создать новый буфер привата \"%s\"\n" @@ -2179,10 +2175,6 @@ msgid "%s%s: server \"%s\" already exists, can't create it!" msgstr "%s сервер \"%s\" уже существует, не могу создать его!\n" #, fuzzy, c-format -msgid "%s: server %s%s%s created" -msgstr "Сервер %s%s%s создан\n" - -#, fuzzy, c-format msgid "%s%s: unable to create server" msgstr "%s не могу создать сервер\n" @@ -2191,14 +2183,6 @@ msgid "%s: server %s%s%s has been copied to %s%s" msgstr "Сервер %s%s%s скопирован в %s%s\n" #, fuzzy, c-format -msgid "%s%s: server \"%s\" is not a temporary server" -msgstr "%s сервер \"%s\" не является временным сервером\n" - -#, fuzzy, c-format -msgid "%s: server %s%s%s is not temporary any more" -msgstr "Сервер %s%s%s больше не временный\n" - -#, fuzzy, c-format msgid "" "%s%s: you can not delete server \"%s\" because you are connected to. Try \"/" "disconnect %s\" before." @@ -2290,11 +2274,12 @@ msgstr "" "[-all [-nojoin] | сервер [servername ...] [-nojoin] | адрес [-port порт] [-" "ipv6] [-ssl]]" +#, fuzzy msgid "" " -all: connect to all servers\n" "servername: internal server name to connect\n" " -nojoin: do not join any channel (even if autojoin is enabled on server)\n" -" hostname: hostname to connect, creating temporary server\n" +" hostname: hostname to connect\n" " port: port for server (integer, default is 6667)\n" " ipv6: use IPv6 protocol\n" " ssl: use SSL protocol" @@ -2731,10 +2716,8 @@ msgstr "перечислить, добавить или удалить серв #, fuzzy msgid "" "[list [servername]] | [listfull [servername]] | [add servername hostname[/" -"port] [-temp] [-auto | -noauto] [-ipv6] [-ssl] [-pwd password] [-nicks nick1," -"nick2,...] [-username username] [-realname realname] [-autojoin channel[," -"channel]] ] | [copy servername newservername] | [rename servername " -"newservername] | [keep servername] | [del servername]" +"port] [-auto | -noauto] [-ipv6] [-ssl]] | [copy servername newservername] | " +"[rename servername newservername] | [del servername]" msgstr "" "[list [сервер]] | [listfull [сервер]] | [add сервер адрес [-port порт] [-" "temp] [-auto | -noauto] [-ipv6] [-ssl] [-pwd пароль] [-nicks ник1 ник2 ник3] " @@ -2750,21 +2733,25 @@ msgid "" "servername: server name, for internal and display use\n" " hostname: name or IP address of server, with optional port (default: " "6667)\n" -" temp: create temporary server (not saved in config file)\n" " auto: automatically connect to server when WeeChat starts\n" " noauto: do not connect to server when WeeChat starts (default)\n" " ipv6: use IPv6 protocol\n" " ssl: use SSL protocol\n" -" password: password for server\n" -"nick1,2,..: nicknames for server\n" -" username: user name\n" -" realname: real name of user\n" " copy: duplicate a server\n" " rename: rename a server\n" -" keep: keep server in config file (for temporary servers only)\n" " del: delete a server\n" " deloutq: delete messages out queue for all servers (all messages WeeChat " -"is currently sending)" +"is currently sending)\n" +"\n" +"Examples:\n" +" /server listfull\n" +" /server add oftc irc.oftc.net/6697 -ssl\n" +" /server add oftc6 irc6.oftc.net/6697 -ipv6 -ssl\n" +" /server add freenode2 chat.eu.freenode.net/6697,chat.us.freenode.net/6667\n" +" /server copy oftc oftcbis\n" +" /server rename oftc newoftc\n" +" /server del freenode\n" +" /server deloutq" msgstr "" " list: перечислить серверы (отсутствие параметров подразумевает этот " "список)\n" @@ -3171,12 +3158,6 @@ msgstr "вкл." msgid "off" msgstr "выкл." -msgid " (temporary server, will not be saved)" -msgstr " (временный сервер, не будет сохранён)" - -msgid " (temporary)" -msgstr " (временный)" - #, fuzzy msgid "channel" msgid_plural "channels" @@ -3779,6 +3760,10 @@ msgstr "%s \"%s\" команда получена без хоста\n" msgid "%s%s: error when allocating new server" msgstr "%s не могу расположить новый сервер\n" +#, fuzzy, c-format +msgid "%s%s: error creating new server \"%s\"" +msgstr "%s недостаточно памяти для сообщения в строке информации\n" + #, c-format msgid "" "%s%s: error sending data to IRC server: null pointer (please report problem " @@ -4604,6 +4589,28 @@ msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s нет аргумента для параметра \"%s\"\n" #, fuzzy +#~ msgid "%s: server %s%s%s created (temporary server, NOT SAVED!)" +#~ msgstr "Сервер %s%s%s создан (временный сервер, НЕ СОХРАНЁН!\n" + +#, fuzzy +#~ msgid "%s%s: nick \"%s\" not found for \"%s\" command" +#~ msgstr "%s ник \"%s\" не найден для команды \"%s\"\n" + +#, fuzzy +#~ msgid "%s%s: server \"%s\" is not a temporary server" +#~ msgstr "%s сервер \"%s\" не является временным сервером\n" + +#, fuzzy +#~ msgid "%s: server %s%s%s is not temporary any more" +#~ msgstr "Сервер %s%s%s больше не временный\n" + +#~ msgid " (temporary server, will not be saved)" +#~ msgstr " (временный сервер, не будет сохранён)" + +#~ msgid " (temporary)" +#~ msgstr " (временный)" + +#, fuzzy #~ msgid "write of infolist type 'integer'" #~ msgstr " . тип: целочисленный\n" diff --git a/po/weechat.pot b/po/weechat.pot index 3d0130dfa..6a29837e5 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: 2008-08-13 16:43+0200\n" +"POT-Creation-Date: 2008-08-22 12:08+0200\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" @@ -1731,7 +1731,7 @@ msgid "%s%s: error opening file, closing it" msgstr "" #, c-format -msgid "%s%s: invalid syntax for IRC server ('%s'), ignored" +msgid "%s%s: error with IRC server from URL (\"s\"), ignored" msgstr "" #, c-format @@ -1767,7 +1767,7 @@ msgid "%s%s: missing argument for \"%s\" option" msgstr "" #, c-format -msgid "%s: server %s%s%s created (temporary server, NOT SAVED!)" +msgid "%s: server %s%s%s created" msgstr "" #, c-format @@ -1808,10 +1808,6 @@ msgid "" msgstr "" #, c-format -msgid "%s%s: nick \"%s\" not found for \"%s\" command" -msgstr "" - -#, c-format msgid "%s%s: cannot create new private buffer \"%s\"" msgstr "" @@ -1846,10 +1842,6 @@ msgid "%s%s: server \"%s\" already exists, can't create it!" msgstr "" #, c-format -msgid "%s: server %s%s%s created" -msgstr "" - -#, c-format msgid "%s%s: unable to create server" msgstr "" @@ -1858,14 +1850,6 @@ msgid "%s: server %s%s%s has been copied to %s%s" msgstr "" #, c-format -msgid "%s%s: server \"%s\" is not a temporary server" -msgstr "" - -#, c-format -msgid "%s: server %s%s%s is not temporary any more" -msgstr "" - -#, c-format msgid "" "%s%s: you can not delete server \"%s\" because you are connected to. Try \"/" "disconnect %s\" before." @@ -1950,7 +1934,7 @@ msgid "" " -all: connect to all servers\n" "servername: internal server name to connect\n" " -nojoin: do not join any channel (even if autojoin is enabled on server)\n" -" hostname: hostname to connect, creating temporary server\n" +" hostname: hostname to connect\n" " port: port for server (integer, default is 6667)\n" " ipv6: use IPv6 protocol\n" " ssl: use SSL protocol" @@ -2300,10 +2284,8 @@ msgstr "" msgid "" "[list [servername]] | [listfull [servername]] | [add servername hostname[/" -"port] [-temp] [-auto | -noauto] [-ipv6] [-ssl] [-pwd password] [-nicks nick1," -"nick2,...] [-username username] [-realname realname] [-autojoin channel[," -"channel]] ] | [copy servername newservername] | [rename servername " -"newservername] | [keep servername] | [del servername]" +"port] [-auto | -noauto] [-ipv6] [-ssl]] | [copy servername newservername] | " +"[rename servername newservername] | [del servername]" msgstr "" msgid "" @@ -2313,21 +2295,25 @@ msgid "" "servername: server name, for internal and display use\n" " hostname: name or IP address of server, with optional port (default: " "6667)\n" -" temp: create temporary server (not saved in config file)\n" " auto: automatically connect to server when WeeChat starts\n" " noauto: do not connect to server when WeeChat starts (default)\n" " ipv6: use IPv6 protocol\n" " ssl: use SSL protocol\n" -" password: password for server\n" -"nick1,2,..: nicknames for server\n" -" username: user name\n" -" realname: real name of user\n" " copy: duplicate a server\n" " rename: rename a server\n" -" keep: keep server in config file (for temporary servers only)\n" " del: delete a server\n" " deloutq: delete messages out queue for all servers (all messages WeeChat " -"is currently sending)" +"is currently sending)\n" +"\n" +"Examples:\n" +" /server listfull\n" +" /server add oftc irc.oftc.net/6697 -ssl\n" +" /server add oftc6 irc6.oftc.net/6697 -ipv6 -ssl\n" +" /server add freenode2 chat.eu.freenode.net/6697,chat.us.freenode.net/6667\n" +" /server copy oftc oftcbis\n" +" /server rename oftc newoftc\n" +" /server del freenode\n" +" /server deloutq" msgstr "" msgid "list services currently connected to the network" @@ -2657,12 +2643,6 @@ msgstr "" msgid "off" msgstr "" -msgid " (temporary server, will not be saved)" -msgstr "" - -msgid " (temporary)" -msgstr "" - msgid "channel" msgid_plural "channels" msgstr[0] "" @@ -3260,6 +3240,10 @@ msgid "%s%s: error when allocating new server" msgstr "" #, c-format +msgid "%s%s: error creating new server \"%s\"" +msgstr "" + +#, c-format msgid "" "%s%s: error sending data to IRC server: null pointer (please report problem " "to developers)" diff --git a/src/core/wee-config-file.c b/src/core/wee-config-file.c index ac703e13a..ef5e2925d 100644 --- a/src/core/wee-config-file.c +++ b/src/core/wee-config-file.c @@ -2160,7 +2160,21 @@ config_file_add_to_infolist (struct t_infolist *infolist, return 0; } if (!infolist_new_var_string (ptr_item, - "name", + "config_name", + ptr_config->name)) + { + free (option_full_name); + return 0; + } + if (!infolist_new_var_string (ptr_item, + "section_name", + ptr_section->name)) + { + free (option_full_name); + return 0; + } + if (!infolist_new_var_string (ptr_item, + "option_name", ptr_option->name)) { free (option_full_name); diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index f6515546c..8ef5f7ba6 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -525,7 +525,8 @@ irc_command_connect (void *data, struct t_gui_buffer *buffer, int argc, { struct t_irc_server server_tmp; int i, nb_connect, connect_ok, all_servers, no_join, port, ipv6, ssl; - char *error; + int default_ipv6, default_ssl; + char *error, value[16]; long number; IRC_GET_SERVER(buffer); @@ -599,15 +600,19 @@ irc_command_connect (void *data, struct t_gui_buffer *buffer, int argc, else { irc_server_init (&server_tmp); - server_tmp.name = strdup (argv[i]); + + default_ipv6 = server_tmp.ipv6; + default_ssl = server_tmp.ssl; + + server_tmp.name = irc_server_get_name_without_port (argv[i]); server_tmp.addresses = strdup (argv[i]); server_tmp.ipv6 = ipv6; server_tmp.ssl = ssl; + ptr_server = irc_server_new (server_tmp.name, server_tmp.autoconnect, server_tmp.autoreconnect, server_tmp.autoreconnect_delay, - 1, /* temp server */ server_tmp.addresses, server_tmp.ipv6, server_tmp.ssl, @@ -623,13 +628,35 @@ irc_command_connect (void *data, struct t_gui_buffer *buffer, int argc, if (ptr_server) { weechat_printf (NULL, - _("%s: server %s%s%s created " - "(temporary server, " - "NOT SAVED!)"), + _("%s: server %s%s%s created"), "irc", IRC_COLOR_CHAT_SERVER, server_tmp.name, IRC_COLOR_CHAT); + + /* create server options */ + irc_server_new_option (&server_tmp, + IRC_CONFIG_SERVER_ADDRESSES, + server_tmp.addresses); + if (default_ipv6 != server_tmp.ipv6) + { + snprintf (value, sizeof (value), + "%s", + (server_tmp.ipv6) ? "on" : "off"); + irc_server_new_option (&server_tmp, + IRC_CONFIG_SERVER_IPV6, + value); + } + if (default_ssl != server_tmp.ssl) + { + snprintf (value, sizeof (value), + "%s", + (server_tmp.ssl) ? "on" : "off"); + irc_server_new_option (&server_tmp, + IRC_CONFIG_SERVER_SSL, + value); + } + if (!irc_command_connect_one_server (ptr_server, 0)) connect_ok = 0; } @@ -2518,9 +2545,12 @@ int irc_command_server (void *data, struct t_gui_buffer *buffer, int argc, char **argv, char **argv_eol) { - int i, detailed_list, one_server_found; + int i, detailed_list, one_server_found, length; + int default_autoconnect, default_ipv6, default_ssl; struct t_irc_server server_tmp, *ptr_server, *server_found, *new_server; - char *server_name; + char *server_name, *mask, value[16]; + struct t_infolist *infolist; + struct t_config_option *ptr_option; /* make C compiler happy */ (void) data; @@ -2638,14 +2668,6 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc, return WEECHAT_RC_ERROR; } - /* TODO: fix server command */ - weechat_printf (NULL, - "%sSome server options are temporarirly disabled in " - "this version, you can use /set irc.server.xxxx.yyyy = zzzz " - "and /reload command to reload options from irc.conf", - weechat_prefix ("error")); - return WEECHAT_RC_ERROR; - if (weechat_strcasecmp (argv[1], "add") == 0) { if (argc < 4) @@ -2663,6 +2685,10 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc, /* init server struct */ irc_server_init (&server_tmp); + + default_autoconnect = server_tmp.autoconnect; + default_ipv6 = server_tmp.ipv6; + default_ssl = server_tmp.ssl; server_tmp.name = strdup (argv[2]); server_tmp.addresses = strdup (argv[3]); @@ -2672,8 +2698,6 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc, { if (argv[i][0] == '-') { - if (weechat_strcasecmp (argv[i], "-temp") == 0) - server_tmp.temp_server = 1; if (weechat_strcasecmp (argv[i], "-auto") == 0) server_tmp.autoconnect = 1; if (weechat_strcasecmp (argv[i], "-noauto") == 0) @@ -2682,76 +2706,6 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc, server_tmp.ipv6 = 1; if (weechat_strcasecmp (argv[i], "-ssl") == 0) server_tmp.ssl = 1; - if (weechat_strcasecmp (argv[i], "-pwd") == 0) - { - if (i == (argc - 1)) - { - weechat_printf (NULL, - _("%s%s: missing argument for " - "\"%s\" option"), - weechat_prefix ("error"), "irc", - "-pwd"); - irc_server_free_data (&server_tmp); - return WEECHAT_RC_ERROR; - } - server_tmp.password = strdup (argv[++i]); - } - if (weechat_strcasecmp (argv[i], "-nicks") == 0) - { - if (i == (argc - 1)) - { - weechat_printf (NULL, - _("%s%s: missing argument for " - "\"%s\" option"), - weechat_prefix ("error"), "irc", - "-nicks"); - irc_server_free_data (&server_tmp); - return WEECHAT_RC_ERROR; - } - server_tmp.nicks = strdup (argv[++i]); - } - if (weechat_strcasecmp (argv[i], "-username") == 0) - { - if (i == (argc - 1)) - { - weechat_printf (NULL, - _("%s%s: missing argument for " - "\"%s\" option"), - weechat_prefix ("error"), "irc", - "-username"); - irc_server_free_data (&server_tmp); - return WEECHAT_RC_ERROR; - } - server_tmp.username = strdup (argv[++i]); - } - if (weechat_strcasecmp (argv[i], "-realname") == 0) - { - if (i == (argc - 1)) - { - weechat_printf (NULL, - _("%s%s: missing argument for " - "\"%s\" option"), - weechat_prefix ("error"), "irc", - "-realname"); - irc_server_free_data (&server_tmp); - return WEECHAT_RC_ERROR; - } - server_tmp.realname = strdup (argv[++i]); - } - if (weechat_strcasecmp (argv[i], "-autojoin") == 0) - { - if (i == (argc - 1)) - { - weechat_printf (NULL, - _("%s%s: missing argument for " - "\"%s\" option"), - weechat_prefix ("error"), "irc", - "-autojoin"); - irc_server_free_data (&server_tmp); - return WEECHAT_RC_ERROR; - } - server_tmp.autojoin = strdup (argv[++i]); - } } } @@ -2760,7 +2714,6 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc, server_tmp.autoconnect, server_tmp.autoreconnect, server_tmp.autoreconnect_delay, - server_tmp.temp_server, server_tmp.addresses, server_tmp.ipv6, server_tmp.ssl, @@ -2781,6 +2734,38 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc, IRC_COLOR_CHAT_SERVER, server_tmp.name, IRC_COLOR_CHAT); + + /* create server options */ + irc_server_new_option (&server_tmp, + IRC_CONFIG_SERVER_ADDRESSES, + server_tmp.addresses); + if (default_autoconnect != server_tmp.autoconnect) + { + snprintf (value, sizeof (value), + "%s", + (server_tmp.autoconnect) ? "on" : "off"); + irc_server_new_option (&server_tmp, + IRC_CONFIG_SERVER_AUTOCONNECT, + value); + } + if (default_ipv6 != server_tmp.ipv6) + { + snprintf (value, sizeof (value), + "%s", + (server_tmp.ipv6) ? "on" : "off"); + irc_server_new_option (&server_tmp, + IRC_CONFIG_SERVER_IPV6, + value); + } + if (default_ssl != server_tmp.ssl) + { + snprintf (value, sizeof (value), + "%s", + (server_tmp.ssl) ? "on" : "off"); + irc_server_new_option (&server_tmp, + IRC_CONFIG_SERVER_SSL, + value); + } } else { @@ -2842,56 +2827,12 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc, IRC_COLOR_CHAT, IRC_COLOR_CHAT_SERVER, argv[3]); - //gui_window_redraw_all_buffers (); return WEECHAT_RC_OK; } return WEECHAT_RC_ERROR; } - if (weechat_strcasecmp (argv[1], "keep") == 0) - { - if (argc < 3) - { - IRC_COMMAND_TOO_FEW_ARGUMENTS(NULL, "server rename"); - } - - /* look for server by name */ - server_found = irc_server_search (argv[2]); - if (!server_found) - { - weechat_printf (NULL, - _("%s%s: server \"%s\" not found for " - "\"%s\" command"), - weechat_prefix ("error"), "irc", - argv[2], "server keep"); - return WEECHAT_RC_ERROR; - } - - /* check that it is temporary server */ - if (!server_found->temp_server) - { - weechat_printf (NULL, - _("%s%s: server \"%s\" is not a temporary " - "server"), - weechat_prefix ("error"), "irc", argv[2]); - return WEECHAT_RC_ERROR; - } - - /* remove temporary flag on server */ - server_found->temp_server = 0; - - weechat_printf (NULL, - _("%s: server %s%s%s is not temporary any " - "more"), - "irc", - IRC_COLOR_CHAT_SERVER, - argv[2], - IRC_COLOR_CHAT); - - return WEECHAT_RC_OK; - } - if (weechat_strcasecmp (argv[1], "del") == 0) { if (argc < 3) @@ -2919,24 +2860,29 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc, weechat_prefix ("error"), "irc", argv[2], argv[2]); return WEECHAT_RC_ERROR; - } - - /* - for (ptr_buffer = gui_buffers; ptr_buffer; - ptr_buffer = ptr_buffer->next_buffer) - { - if ((ptr_buffer->protocol == irc_protocol) - && (IRC_BUFFER_SERVER(ptr_buffer) == server_found)) - { - IRC_BUFFER_SERVER(ptr_buffer) = NULL; - IRC_BUFFER_CHANNEL(ptr_buffer) = NULL; - } - } - */ + } server_name = strdup (server_found->name); - irc_server_free (server_found); + /* remove all options (server will be removed when last option is removed) */ + length = 32 + strlen (server_found->name) + 1; + mask = malloc (length); + if (mask) + { + snprintf (mask, length, "irc.server.%s.*", server_found->name); + infolist = weechat_infolist_get ("options", NULL, mask); + free (mask); + while (weechat_infolist_next (infolist)) + { + weechat_config_search_with_string (weechat_infolist_string (infolist, + "full_name"), + NULL, NULL, &ptr_option, + NULL); + if (ptr_option) + weechat_config_option_unset (ptr_option); + } + weechat_infolist_free (infolist); + } weechat_printf (NULL, _("%s: Server %s%s%s has been deleted"), @@ -2947,8 +2893,6 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc, if (server_name) free (server_name); - //gui_window_redraw_buffer (window->buffer); - return WEECHAT_RC_OK; } @@ -2966,10 +2910,11 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc, "irc"); return WEECHAT_RC_OK; } - + weechat_printf (NULL, _("%s%s: unknown option for \"%s\" command"), weechat_prefix ("error"), "irc", "server"); + return WEECHAT_RC_ERROR; } @@ -3593,8 +3538,7 @@ irc_command_init () "servername: internal server name to connect\n" " -nojoin: do not join any channel (even if " "autojoin is enabled on server)\n" - " hostname: hostname to connect, creating " - "temporary server\n" + " hostname: hostname to connect\n" " port: port for server (integer, default " "is 6667)\n" " ipv6: use IPv6 protocol\n" @@ -3857,14 +3801,11 @@ irc_command_init () weechat_hook_command ("server", N_("list, add or remove servers"), N_("[list [servername]] | [listfull [servername]] | " - "[add servername hostname[/port] [-temp] " - "[-auto | -noauto] [-ipv6] [-ssl] [-pwd password] " - "[-nicks nick1,nick2,...] [-username username] " - "[-realname realname] " - "[-autojoin channel[,channel]] ] | " + "[add servername hostname[/port] " + "[-auto | -noauto] [-ipv6] [-ssl]] | " "[copy servername newservername] | " "[rename servername newservername] | " - "[keep servername] | [del servername]"), + "[del servername]"), N_(" list: list servers (no parameter implies " "this list)\n" " listfull: list servers with detailed info for " @@ -3874,27 +3815,29 @@ irc_command_init () "display use\n" " hostname: name or IP address of server, with " "optional port (default: 6667)\n" - " temp: create temporary server (not saved " - "in config file)\n" " auto: automatically connect to server " "when WeeChat starts\n" " noauto: do not connect to server when " "WeeChat starts (default)\n" " ipv6: use IPv6 protocol\n" " ssl: use SSL protocol\n" - " password: password for server\n" - "nick1,2,..: nicknames for server\n" - " username: user name\n" - " realname: real name of user\n" " copy: duplicate a server\n" " rename: rename a server\n" - " keep: keep server in config file (for " - "temporary servers only)\n" " del: delete a server\n" " deloutq: delete messages out queue for all " "servers (all messages " - "WeeChat is currently sending)"), - "add|copy|rename|keep|del|deloutq|list|listfull " + "WeeChat is currently sending)\n\n" + "Examples:\n" + " /server listfull\n" + " /server add oftc irc.oftc.net/6697 -ssl\n" + " /server add oftc6 irc6.oftc.net/6697 -ipv6 -ssl\n" + " /server add freenode2 chat.eu.freenode.net/6697," + "chat.us.freenode.net/6667\n" + " /server copy oftc oftcbis\n" + " /server rename oftc newoftc\n" + " /server del freenode\n" + " /server deloutq"), + "add|copy|rename|del|deloutq|list|listfull " "%(irc_servers) %(irc_servers)", &irc_command_server, NULL); weechat_hook_command ("servlist", diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index 1a7c102bf..afe4300d5 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -120,7 +120,7 @@ irc_config_get_server_from_option_name (const char *name) if (name) { - pos_option = strchr (name, '.'); + pos_option = strrchr (name, '.'); if (pos_option) { server_name = weechat_strndup (name, pos_option - name); @@ -343,20 +343,21 @@ irc_config_reload_servers_from_config () struct t_infolist *infolist; struct t_irc_server *ptr_server; struct t_config_option *ptr_option; - char *name, *full_name, *server_name, *pos_option; + char *full_name, *option_name, *server_name, *pos_option; int i, index_option; infolist = weechat_infolist_get ("options", NULL, "irc.server.*"); while (weechat_infolist_next (infolist)) { - name = weechat_infolist_string (infolist, "name"); full_name = weechat_infolist_string (infolist, "full_name"); - if (name && full_name) + option_name = weechat_infolist_string (infolist, "option_name"); + if (full_name && option_name) { - pos_option = strchr (name, '.'); + pos_option = strrchr (option_name, '.'); if (pos_option) { - server_name = weechat_strndup (name, pos_option - name); + server_name = weechat_strndup (option_name, + pos_option - option_name); if (server_name) { pos_option++; @@ -502,7 +503,8 @@ struct t_config_option * irc_config_server_new_option (struct t_config_file *config_file, struct t_config_section *section, int index_option, - const char *option_name, const char *value, + const char *option_name, + const char *value, void *callback_change, void *callback_change_data, void *callback_delete, @@ -682,7 +684,7 @@ irc_config_server_create_option (void *data, struct t_config_file *config_file, if (option_name) { - pos_option = strchr (option_name, '.'); + pos_option = strrchr (option_name, '.'); if (pos_option) { server_name = weechat_strndup (option_name, diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h index 615a3b0b6..170533b87 100644 --- a/src/plugins/irc/irc-config.h +++ b/src/plugins/irc/irc-config.h @@ -58,7 +58,9 @@ enum t_irc_config_server_option extern char *irc_config_server_option_string[]; -extern struct t_config_file *irc_config; +extern struct t_config_file *irc_config_file; +extern struct t_config_section *irc_config_section_server_default; +extern struct t_config_section *irc_config_section_server; extern struct t_config_option *irc_config_look_one_server_buffer; extern struct t_config_option *irc_config_look_open_near_server; @@ -89,6 +91,20 @@ extern struct t_config_option *irc_config_log_hide_nickserv_pwd; extern struct t_config_option *irc_config_server_default[]; +extern int irc_config_search_server_option (const char *option_name); +extern void irc_config_server_change_cb (void *data, + struct t_config_option *option); +extern void irc_config_server_delete_cb (void *data, + struct t_config_option *option); +struct t_config_option *irc_config_server_new_option (struct t_config_file *config_file, + struct t_config_section *section, + int index_option, + const char *option_name, + const char *value, + void *callback_change, + void *callback_change_data, + void *callback_delete, + void *callback_delete_data); extern int irc_config_init (); extern int irc_config_read (); extern int irc_config_write (); diff --git a/src/plugins/irc/irc-display.c b/src/plugins/irc/irc-display.c index d59440b3d..e6c31889a 100644 --- a/src/plugins/irc/irc-display.c +++ b/src/plugins/irc/irc-display.c @@ -166,10 +166,8 @@ irc_display_server (struct t_irc_server *server, int with_detail) _("connected") : _("not connected"), IRC_COLOR_CHAT_DELIMITERS); - weechat_printf (NULL, " autoconnect . . . . : %s%s", - (server->autoconnect) ? _("on") : _("off"), - (server->temp_server) ? - _(" (temporary server, will not be saved)") : ""); + weechat_printf (NULL, " autoconnect . . . . : %s", + (server->autoconnect) ? _("on") : _("off")); weechat_printf (NULL, " autoreconnect . . . : %s", (server->autoreconnect) ? _("on") : _("off")); weechat_printf (NULL, " autoreconnect_delay : %d %s", @@ -228,7 +226,7 @@ irc_display_server (struct t_irc_server *server, int with_detail) { num_channels = irc_server_get_channel_count (server); num_pv = irc_server_get_pv_count (server); - weechat_printf (NULL, " %s %s%s %s[%s%s%s]%s%s, %d %s, %d pv", + weechat_printf (NULL, " %s %s%s %s[%s%s%s]%s, %d %s, %d pv", (server->is_connected) ? "*" : " ", IRC_COLOR_CHAT_SERVER, server->name, @@ -238,20 +236,16 @@ irc_display_server (struct t_irc_server *server, int with_detail) _("connected") : _("not connected"), IRC_COLOR_CHAT_DELIMITERS, IRC_COLOR_CHAT, - (server->temp_server) ? _(" (temporary)") : "", num_channels, - NG_("channel", "channels", - num_channels), + NG_("channel", "channels", num_channels), num_pv); } else { - weechat_printf (NULL, " %s %s%s%s%s", + weechat_printf (NULL, " %s %s%s", (server->is_connected) ? "*" : " ", IRC_COLOR_CHAT_SERVER, - server->name, - IRC_COLOR_CHAT, - (server->temp_server) ? _(" (temporary)") : ""); + server->name); } } } diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index 0c38ff4a8..32895fc6f 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -49,6 +49,57 @@ struct t_irc_message *irc_msgq_last_msg = NULL; /* + * irc_server_get_name_without_port: get name of server without port + * (ends before first '/' if found) + */ + +char * +irc_server_get_name_without_port (const char *name) +{ + char *pos; + + if (!name) + return NULL; + + pos = strchr (name, '/'); + if (pos && (pos != name)) + return weechat_strndup (name, pos - name); + + return strdup (name); +} + +/* + * irc_server_new_option: create option in configuration for a server option + */ + +void +irc_server_new_option (struct t_irc_server *server, int index_option, + const char *value) +{ + int length; + char *option_name; + + length = strlen (server->name) + 1 + + strlen (irc_config_server_option_string[index_option]) + 1; + option_name = malloc (length); + if (option_name) + { + snprintf (option_name, length, "%s.%s", + server->name, + irc_config_server_option_string[index_option]); + irc_config_server_new_option (irc_config_file, + irc_config_section_server, + index_option, + option_name, + value, + &irc_config_server_change_cb, + irc_config_server_option_string[index_option], + &irc_config_server_delete_cb, + irc_config_server_option_string[index_option]); + } +} + +/* * irc_server_set_addresses: set addresses for server */ @@ -252,7 +303,6 @@ irc_server_init (struct t_irc_server *server) server->autoconnect = IRC_CONFIG_SERVER_DEFAULT_AUTOCONNECT; server->autoreconnect = IRC_CONFIG_SERVER_DEFAULT_AUTORECONNECT; server->autoreconnect_delay = IRC_CONFIG_SERVER_DEFAULT_AUTORECONNECT_DELAY; - server->temp_server = 0; server->addresses = NULL; server->ipv6 = IRC_CONFIG_SERVER_DEFAULT_IPV6; server->ssl = IRC_CONFIG_SERVER_DEFAULT_SSL; @@ -320,6 +370,9 @@ struct t_irc_server * irc_server_alloc (const char *name) { struct t_irc_server *new_server; + + if (irc_server_search (name)) + return NULL; /* alloc memory for new server */ if ((new_server = malloc (sizeof (*new_server))) == NULL) @@ -361,7 +414,9 @@ irc_server_alloc_with_url (const char *irc_url) { char *irc_url2, *url, *pos_server, *pos_channel, *pos, *pos2; char *password, *nick1, *nicks, *autojoin; - int ipv6, ssl, length; + char *default_nicks, *default_password, *default_autojoin, value[16]; + char *server_name; + int ipv6, ssl, default_ipv6, default_ssl, length; struct t_irc_server *ptr_server; irc_url2 = strdup (irc_url); @@ -447,15 +502,26 @@ irc_server_alloc_with_url (const char *irc_url) strcat (autojoin, pos_channel); } } - - ptr_server = irc_server_alloc (pos_server); + + /* server name ends before first '/' (if found) */ + server_name = irc_server_get_name_without_port (pos_server); + ptr_server = irc_server_alloc (server_name); + if (server_name) + free (server_name); if (ptr_server) { irc_server_set_addresses (ptr_server, pos_server); + + default_ipv6 = ptr_server->ipv6; + default_ssl = ptr_server->ssl; + default_nicks = (ptr_server->nicks) ? strdup (ptr_server->nicks) : NULL; + default_password = (ptr_server->password) ? strdup (ptr_server->password) : NULL; + default_autojoin = (ptr_server->autojoin) ? strdup (ptr_server->autojoin) : NULL; + ptr_server->ipv6 = ipv6; ptr_server->ssl = ssl; - + if (nick1) { length = ((strlen (nick1) + 2) * 5) + 1; @@ -471,10 +537,60 @@ irc_server_alloc_with_url (const char *irc_url) } ptr_server->password = (password) ? strdup (password) : NULL; ptr_server->autojoin = (autojoin) ? strdup (autojoin) : NULL; - ptr_server->temp_server = 1; ptr_server->autoconnect = 1; + + /* create server options */ + irc_server_new_option (ptr_server, + IRC_CONFIG_SERVER_ADDRESSES, + ptr_server->addresses); + if (default_ipv6 != ptr_server->ipv6) + { + snprintf (value, sizeof (value), + "%s", + (ptr_server->ipv6) ? "on" : "off"); + irc_server_new_option (ptr_server, + IRC_CONFIG_SERVER_IPV6, + value); + } + if (default_ssl != ptr_server->ssl) + { + snprintf (value, sizeof (value), + "%s", + (ptr_server->ssl) ? "on" : "off"); + irc_server_new_option (ptr_server, + IRC_CONFIG_SERVER_SSL, + value); + } + if (ptr_server->nicks + && (!default_nicks || strcmp (default_nicks, ptr_server->nicks) != 0)) + { + irc_server_new_option (ptr_server, + IRC_CONFIG_SERVER_NICKS, + ptr_server->nicks); + } + if (ptr_server->password + && (!default_password || strcmp (default_password, ptr_server->password) != 0)) + { + irc_server_new_option (ptr_server, + IRC_CONFIG_SERVER_PASSWORD, + ptr_server->password); + } + if (ptr_server->autojoin + && (!default_autojoin || strcmp (default_autojoin, ptr_server->autojoin) != 0)) + { + irc_server_new_option (ptr_server, + IRC_CONFIG_SERVER_AUTOJOIN, + ptr_server->autojoin); + } } - + else + { + weechat_printf (NULL, + _("%s%s: error creating new server \"%s\""), + weechat_prefix ("error"), "irc", + pos_server); + } + if (password) free (password); if (nick1) @@ -621,13 +737,15 @@ void irc_server_free (struct t_irc_server *server) { struct t_irc_server *new_irc_servers; - + if (!server) return; /* close any opened channel/private */ while (server->channels) + { irc_channel_free (server, server->channels); + } /* remove server from queue */ if (last_irc_server == server) @@ -666,11 +784,11 @@ irc_server_free_all () struct t_irc_server * irc_server_new (const char *name, int autoconnect, int autoreconnect, - int autoreconnect_delay, int temp_server, const char *addresses, - int ipv6, int ssl, const char *password, const char *nicks, - const char *username, const char *realname, const char *local_hostname, - const char *command, int command_delay, const char *autojoin, - int autorejoin) + int autoreconnect_delay, const char *addresses, int ipv6, + int ssl, const char *password, const char *nicks, + const char *username, const char *realname, + const char *local_hostname, const char *command, + int command_delay, const char *autojoin, int autorejoin) { struct t_irc_server *new_server; @@ -698,7 +816,6 @@ irc_server_new (const char *name, int autoconnect, int autoreconnect, new_server->autoconnect = autoconnect; new_server->autoreconnect = autoreconnect; new_server->autoreconnect_delay = autoreconnect_delay; - new_server->temp_server = temp_server; irc_server_set_addresses (new_server, addresses); new_server->ipv6 = ipv6; new_server->ssl = ssl; @@ -730,20 +847,23 @@ irc_server_new (const char *name, int autoconnect, int autoreconnect, */ struct t_irc_server * -irc_server_duplicate (struct t_irc_server *server, const char *new_name) +irc_server_duplicate (struct t_irc_server *server, const char *new_server_name) { struct t_irc_server *new_server; + int length, index_option; + char *mask, *option_name, *pos_option; + struct t_config_option *ptr_option; + struct t_infolist *infolist; /* check if another server exists with this name */ - if (irc_server_search (new_name)) - return 0; + if (irc_server_search (new_server_name)) + return NULL; /* duplicate server */ - new_server = irc_server_new (new_name, + new_server = irc_server_new (new_server_name, server->autoconnect, server->autoreconnect, server->autoreconnect_delay, - server->temp_server, server->addresses, server->ipv6, server->ssl, @@ -757,6 +877,46 @@ irc_server_duplicate (struct t_irc_server *server, const char *new_name) server->autojoin, server->autorejoin); + if (new_server) + { + /* duplicate options */ + length = 32 + strlen (server->name) + 1; + mask = malloc (length); + if (!mask) + return 0; + snprintf (mask, length, "irc.server.%s.*", server->name); + infolist = weechat_infolist_get ("options", NULL, mask); + free (mask); + while (weechat_infolist_next (infolist)) + { + weechat_config_search_with_string (weechat_infolist_string (infolist, + "full_name"), + NULL, NULL, &ptr_option, + NULL); + if (ptr_option) + { + option_name = weechat_infolist_string (infolist, "option_name"); + if (option_name) + { + pos_option = strrchr (option_name, '.'); + if (pos_option) + { + pos_option++; + + index_option = irc_config_search_server_option (pos_option); + if (index_option >= 0) + { + irc_server_new_option (new_server, + index_option, + weechat_infolist_string (infolist, "value")); + } + } + } + } + } + weechat_infolist_free (infolist); + } + return new_server; } @@ -766,25 +926,26 @@ irc_server_duplicate (struct t_irc_server *server, const char *new_name) */ int -irc_server_rename (struct t_irc_server *server, const char *new_name) +irc_server_rename (struct t_irc_server *server, const char *new_server_name) { int length; - char *option_name, *name, *pos_option; + char *mask, *option_name, *pos_option, *new_option_name; struct t_infolist *infolist; struct t_config_option *ptr_option; + struct t_irc_channel *ptr_channel; /* check if another server exists with this name */ - if (irc_server_search (new_name)) + if (irc_server_search (new_server_name)) return 0; /* rename options */ length = 32 + strlen (server->name) + 1; - option_name = malloc (length); - if (!option_name) + mask = malloc (length); + if (!mask) return 0; - snprintf (option_name, length, "irc.server.%s.*", server->name); - infolist = weechat_infolist_get ("options", NULL, option_name); - free (option_name); + snprintf (mask, length, "irc.server.%s.*", server->name); + infolist = weechat_infolist_get ("options", NULL, mask); + free (mask); while (weechat_infolist_next (infolist)) { weechat_config_search_with_string (weechat_infolist_string (infolist, @@ -793,18 +954,22 @@ irc_server_rename (struct t_irc_server *server, const char *new_name) NULL); if (ptr_option) { - name = weechat_infolist_string (infolist, "name"); - pos_option = strchr (name, '.'); - if (pos_option) + option_name = weechat_infolist_string (infolist, "option_name"); + if (option_name) { - pos_option++; - length = strlen (new_name) + 1 + strlen (pos_option) + 1; - option_name = malloc (length); - if (option_name) + pos_option = strrchr (option_name, '.'); + if (pos_option) { - snprintf (option_name, length, "%s.%s", new_name, pos_option); - weechat_config_option_rename (ptr_option, option_name); - free (option_name); + pos_option++; + length = strlen (new_server_name) + 1 + strlen (pos_option) + 1; + new_option_name = malloc (length); + if (new_option_name) + { + snprintf (new_option_name, length, + "%s.%s", new_server_name, pos_option); + weechat_config_option_rename (ptr_option, new_option_name); + free (new_option_name); + } } } } @@ -814,7 +979,21 @@ irc_server_rename (struct t_irc_server *server, const char *new_name) /* rename server */ if (server->name) free (server->name); - server->name = strdup (new_name); + server->name = strdup (new_server_name); + + /* change "category" for buffers with this server */ + for (ptr_channel = server->channels; ptr_channel; + ptr_channel = ptr_channel->next_channel) + { + if (ptr_channel->buffer) + weechat_buffer_set (ptr_channel->buffer, "category", server->name); + } + if (server->buffer) + { + weechat_buffer_set (server->buffer, "category", server->name); + weechat_buffer_set (server->buffer, "name", server->name); + } + return 1; } @@ -2045,15 +2224,14 @@ irc_server_reconnect (struct t_irc_server *server) */ void -irc_server_auto_connect (int auto_connect, int temp_server) +irc_server_auto_connect (int auto_connect) { struct t_irc_server *ptr_server; for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server) { - if ( ((temp_server) && (ptr_server->temp_server)) - || ((!temp_server) && (auto_connect) && (ptr_server->autoconnect)) ) + if ((auto_connect) && (ptr_server->autoconnect)) { if (!irc_server_connect (ptr_server, 0)) irc_server_reconnect_schedule (ptr_server); @@ -2553,8 +2731,6 @@ irc_server_add_to_infolist (struct t_infolist *infolist, return 0; if (!weechat_infolist_new_var_integer (ptr_item, "autoreconnect_delay", server->autoreconnect_delay)) return 0; - if (!weechat_infolist_new_var_integer (ptr_item, "temp_server", server->temp_server)) - return 0; if (!weechat_infolist_new_var_string (ptr_item, "addresses", server->addresses)) return 0; if (!weechat_infolist_new_var_integer (ptr_item, "ipv6", server->ipv6)) @@ -2642,7 +2818,6 @@ irc_server_print_log () weechat_log_printf (" autoconnect . . . . : %d", ptr_server->autoconnect); weechat_log_printf (" autoreconnect . . . : %d", ptr_server->autoreconnect); weechat_log_printf (" autoreconnect_delay : %d", ptr_server->autoreconnect_delay); - weechat_log_printf (" temp_server . . . . : %d", ptr_server->temp_server); weechat_log_printf (" addresses . . . . . : '%s'", ptr_server->addresses); weechat_log_printf (" ipv6. . . . . . . . : %d", ptr_server->ipv6); weechat_log_printf (" ssl . . . . . . . . : %d", ptr_server->ssl); diff --git a/src/plugins/irc/irc-server.h b/src/plugins/irc/irc-server.h index 9257d0775..de19a7b42 100644 --- a/src/plugins/irc/irc-server.h +++ b/src/plugins/irc/irc-server.h @@ -62,7 +62,6 @@ struct t_irc_server 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 temp_server; /* server is temporary (not saved!) */ char *addresses; /* server addresses (IP/name with port) */ int ipv6; /* use IPv6 protocol */ int ssl; /* SSL protocol */ @@ -136,6 +135,10 @@ extern const int gnutls_prot_prio[]; extern struct t_irc_message *irc_recv_msgq, *irc_msgq_last_msg; +extern char *irc_server_get_name_without_port (const char *name); +extern void irc_server_new_option (struct t_irc_server *server, + int index_option, + const char *value); extern void irc_server_set_addresses (struct t_irc_server *server, const char *addresses); extern void irc_server_set_nicks (struct t_irc_server *server, const char *nicks); @@ -150,12 +153,17 @@ extern void irc_server_free_all (); extern struct t_irc_server *irc_server_new (const char *name, int autoconnect, int autoreconnect, int autoreconnect_delay, - int temp_server, const char *addresses, - int ipv6, int ssl, - const char *password, const char *nicks, - const char *username, const char *realname, - const char *hostname, const char *command, - int command_delay, const char *autojoin, + const char *addresses, + int ipv6, + int ssl, + const char *password, + const char *nicks, + const char *username, + const char *realname, + const char *hostname, + const char *command, + int command_delay, + const char *autojoin, int autorejoin); extern struct t_irc_server *irc_server_duplicate (struct t_irc_server *server, const char *new_name); @@ -167,7 +175,7 @@ extern void irc_server_sendf (struct t_irc_server *server, const char *format, . extern struct t_irc_server *irc_server_search (const char *server_name); extern int irc_server_connect (struct t_irc_server *server, int disable_autojoin); -extern void irc_server_auto_connect (int auto_connect, int temp_server); +extern void irc_server_auto_connect (int auto_connect); extern void irc_server_autojoin_channels (); extern int irc_server_recv_cb (void *arg_server); extern int irc_server_timer_cb (void *data); diff --git a/src/plugins/irc/irc.c b/src/plugins/irc/irc.c index 245b8a7f2..d9a839e70 100644 --- a/src/plugins/irc/irc.c +++ b/src/plugins/irc/irc.c @@ -140,8 +140,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) if (!irc_server_alloc_with_url (argv[i])) { weechat_printf (NULL, - _("%s%s: invalid syntax for IRC server " - "('%s'), ignored"), + _("%s%s: error with IRC server from URL " + "(\"s\"), ignored"), weechat_prefix ("error"), "irc", argv[i]); } @@ -151,11 +151,11 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) upgrading = 1; } } - + if (upgrading) irc_upgrade_load (); else - irc_server_auto_connect (auto_connect, 0); + irc_server_auto_connect (auto_connect); irc_hook_timer = weechat_hook_timer (1 * 1000, 0, 0, &irc_server_timer_cb, NULL); diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index 5322a49f9..b5334ce05 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -349,6 +349,7 @@ plugin_load (const char *filename) new_plugin->config_string_to_boolean = &config_file_string_to_boolean; new_plugin->config_option_reset = &config_file_option_reset; new_plugin->config_option_set = &config_file_option_set; + new_plugin->config_option_unset = &config_file_option_unset; new_plugin->config_option_rename = &config_file_option_rename; new_plugin->config_option_get_pointer = &config_file_option_get_pointer; new_plugin->config_boolean = &config_file_option_boolean; diff --git a/src/plugins/scripts/lua/weechat-lua-api.c b/src/plugins/scripts/lua/weechat-lua-api.c index 0491b8ddf..b117a4d52 100644 --- a/src/plugins/scripts/lua/weechat-lua-api.c +++ b/src/plugins/scripts/lua/weechat-lua-api.c @@ -1479,6 +1479,42 @@ weechat_lua_api_config_option_set (lua_State *L) } /* + * weechat_lua_api_config_option_unset: unset an option + */ + +static int +weechat_lua_api_config_option_unset (lua_State *L) +{ + const char *option; + int n, rc; + + /* make C compiler happy */ + (void) L; + + if (!lua_current_script) + { + WEECHAT_SCRIPT_MSG_NOT_INITIALIZED("config_option_unset"); + LUA_RETURN_INT(0); + } + + option = NULL; + + n = lua_gettop (lua_current_interpreter); + + if (n < 1) + { + WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("config_option_unset"); + LUA_RETURN_INT(0); + } + + option = lua_tostring (lua_current_interpreter, -1); + + rc = weechat_config_option_unset (script_str2ptr (option)); + + LUA_RETURN_INT(rc); +} + +/* * weechat_lua_api_config_option_rename: rename an option */ @@ -4950,6 +4986,7 @@ const struct luaL_reg weechat_lua_api_funcs[] = { { "config_string_to_boolean", &weechat_lua_api_config_string_to_boolean }, { "config_option_reset", &weechat_lua_api_config_option_reset }, { "config_option_set", &weechat_lua_api_config_option_set }, + { "config_option_unset", &weechat_lua_api_config_option_unset }, { "config_option_rename", &weechat_lua_api_config_option_rename }, { "config_boolean", &weechat_lua_api_config_boolean }, { "config_integer", &weechat_lua_api_config_integer }, diff --git a/src/plugins/scripts/perl/weechat-perl-api.c b/src/plugins/scripts/perl/weechat-perl-api.c index bcee5ce30..0926e4653 100644 --- a/src/plugins/scripts/perl/weechat-perl-api.c +++ b/src/plugins/scripts/perl/weechat-perl-api.c @@ -1234,6 +1234,37 @@ static XS (XS_weechat_config_option_set) } /* + * weechat::config_option_unset: unset an option + */ + +static XS (XS_weechat_config_option_unset) +{ + int rc; + char *option; + dXSARGS; + + /* make C compiler happy */ + (void) cv; + + if (!perl_current_script) + { + WEECHAT_SCRIPT_MSG_NOT_INITIALIZED("config_option_unset"); + PERL_RETURN_INT(0); + } + + if (items < 1) + { + WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("config_option_unset"); + PERL_RETURN_INT(0); + } + + option = SvPV (ST (0), PL_na); + rc = weechat_config_option_unset (script_str2ptr (option)); + + PERL_RETURN_INT(rc); +} + +/* * weechat::config_option_rename: rename an option */ @@ -3878,6 +3909,7 @@ weechat_perl_api_init (pTHX) newXS ("weechat::config_string_to_boolean", XS_weechat_config_string_to_boolean, "weechat"); newXS ("weechat::config_option_reset", XS_weechat_config_option_reset, "weechat"); newXS ("weechat::config_option_set", XS_weechat_config_option_set, "weechat"); + newXS ("weechat::config_option_unset", XS_weechat_config_option_unset, "weechat"); newXS ("weechat::config_option_rename", XS_weechat_config_option_rename, "weechat"); newXS ("weechat::config_boolean", XS_weechat_config_boolean, "weechat"); newXS ("weechat::config_integer", XS_weechat_config_integer, "weechat"); diff --git a/src/plugins/scripts/python/weechat-python-api.c b/src/plugins/scripts/python/weechat-python-api.c index 755e16300..5adc196e1 100644 --- a/src/plugins/scripts/python/weechat-python-api.c +++ b/src/plugins/scripts/python/weechat-python-api.c @@ -1303,6 +1303,38 @@ weechat_python_api_config_option_set (PyObject *self, PyObject *args) } /* + * weechat_python_api_config_option_unset: unset an option + */ + +static PyObject * +weechat_python_api_config_option_unset (PyObject *self, PyObject *args) +{ + char *option; + int rc; + + /* make C compiler happy */ + (void) self; + + if (!python_current_script) + { + WEECHAT_SCRIPT_MSG_NOT_INITIALIZED("config_option_unset"); + PYTHON_RETURN_INT(0); + } + + option = NULL; + + if (!PyArg_ParseTuple (args, "s", &option)) + { + WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("config_option_unset"); + PYTHON_RETURN_INT(0); + } + + rc = weechat_config_option_unset (script_str2ptr (option)); + + PYTHON_RETURN_INT(rc); +} + +/* * weechat_python_api_config_option_rename: rename an option */ @@ -4121,6 +4153,7 @@ PyMethodDef weechat_python_funcs[] = { "config_string_to_boolean", &weechat_python_api_config_string_to_boolean, METH_VARARGS, "" }, { "config_option_reset", &weechat_python_api_config_option_reset, METH_VARARGS, "" }, { "config_option_set", &weechat_python_api_config_option_set, METH_VARARGS, "" }, + { "config_option_unset", &weechat_python_api_config_option_unset, METH_VARARGS, "" }, { "config_option_rename", &weechat_python_api_config_option_rename, METH_VARARGS, "" }, { "config_boolean", &weechat_python_api_config_boolean, METH_VARARGS, "" }, { "config_integer", &weechat_python_api_config_integer, METH_VARARGS, "" }, diff --git a/src/plugins/scripts/ruby/weechat-ruby-api.c b/src/plugins/scripts/ruby/weechat-ruby-api.c index c41010fd6..3a876e349 100644 --- a/src/plugins/scripts/ruby/weechat-ruby-api.c +++ b/src/plugins/scripts/ruby/weechat-ruby-api.c @@ -1510,6 +1510,42 @@ weechat_ruby_api_config_option_set (VALUE class, VALUE option, VALUE new_value, } /* + * weechat_ruby_api_config_option_unset: unset an option + */ + +static VALUE +weechat_ruby_api_config_option_unset (VALUE class, VALUE option) +{ + char *c_option; + int rc; + + /* make C compiler happy */ + (void) class; + + if (!ruby_current_script) + { + WEECHAT_SCRIPT_MSG_NOT_INITIALIZED("config_option_unset"); + RUBY_RETURN_INT(0); + } + + c_option = NULL; + + if (NIL_P (option)) + { + WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("config_option_unset"); + RUBY_RETURN_INT(0); + } + + Check_Type (option, T_STRING); + + c_option = STR2CSTR (option); + + rc = weechat_config_option_unset (script_str2ptr (c_option)); + + RUBY_RETURN_INT(rc); +} + +/* * weechat_ruby_api_config_option_rename: rename an option */ @@ -4756,6 +4792,7 @@ weechat_ruby_api_init (VALUE ruby_mWeechat) rb_define_module_function (ruby_mWeechat, "config_string_to_boolean", &weechat_ruby_api_config_string_to_boolean, 1); rb_define_module_function (ruby_mWeechat, "config_option_reset", &weechat_ruby_api_config_option_reset, 2); rb_define_module_function (ruby_mWeechat, "config_option_set", &weechat_ruby_api_config_option_set, 3); + rb_define_module_function (ruby_mWeechat, "config_option_unset", &weechat_ruby_api_config_option_unset, 1); rb_define_module_function (ruby_mWeechat, "config_option_rename", &weechat_ruby_api_config_option_rename, 2); rb_define_module_function (ruby_mWeechat, "config_boolean", &weechat_ruby_api_config_boolean, 1); rb_define_module_function (ruby_mWeechat, "config_integer", &weechat_ruby_api_config_integer, 1); diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h index af91e3df1..0a3526ad6 100644 --- a/src/plugins/weechat-plugin.h +++ b/src/plugins/weechat-plugin.h @@ -263,6 +263,7 @@ struct t_weechat_plugin int run_callback); int (*config_option_set) (struct t_config_option *option, const char *value, int run_callback); + int (*config_option_unset) (struct t_config_option *option); void (*config_option_rename) (struct t_config_option *option, const char *new_name); void *(*config_option_get_pointer) (struct t_config_option *option, @@ -705,6 +706,8 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin); #define weechat_config_option_set(__option, __value, __run_callback) \ weechat_plugin->config_option_set(__option, __value, \ __run_callback) +#define weechat_config_option_unset(__option) \ + weechat_plugin->config_option_unset(__option) #define weechat_config_option_rename(__option, __new_name) \ weechat_plugin->config_option_rename(__option, __new_name) #define weechat_config_option_get_pointer(__option, __property) \ |