diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-04-18 15:39:24 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-04-18 15:39:24 +0200 |
commit | 1486429cf1dff6f45536bf07de35caf3d060672f (patch) | |
tree | 622dd800d615778fa59629295ce2ace2d4df724a | |
parent | 22c619040bb2ec783199490264bb167b8e425e53 (diff) | |
download | weechat-1486429cf1dff6f45536bf07de35caf3d060672f.zip |
Replaced /builtin command by /command, and can now be used to launch commands with same name from different plugins
-rw-r--r-- | po/cs.po | 138 | ||||
-rw-r--r-- | po/de.po | 136 | ||||
-rw-r--r-- | po/es.po | 137 | ||||
-rw-r--r-- | po/fr.po | 89 | ||||
-rw-r--r-- | po/hu.po | 138 | ||||
-rw-r--r-- | po/ru.po | 137 | ||||
-rw-r--r-- | po/weechat.pot | 67 | ||||
-rw-r--r-- | src/core/wee-command.c | 50 | ||||
-rw-r--r-- | src/core/wee-hook.c | 64 | ||||
-rw-r--r-- | src/core/wee-hook.h | 4 | ||||
-rw-r--r-- | src/core/wee-input.c | 65 | ||||
-rw-r--r-- | src/core/wee-input.h | 8 | ||||
-rw-r--r-- | src/gui/gui-action.c | 2 | ||||
-rw-r--r-- | src/gui/gui-completion.c | 54 | ||||
-rw-r--r-- | src/gui/gui-keyboard.c | 2 | ||||
-rw-r--r-- | src/plugins/plugin-api.c | 2 |
16 files changed, 578 insertions, 515 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-04-15 13:49+0200\n" +"POT-Creation-Date: 2008-04-18 15:36+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" @@ -221,6 +221,10 @@ msgstr "(hotlist: zvýraznění + zprávy)\n" msgid "(hotlist: highlights + messages + join/part (all))" msgstr "(hotlist: zvýrazění + zprávy + připojení/odpojení (vše))\n" +#, fuzzy, c-format +msgid "%sPlugin \"%s\" not found" +msgstr "%s adresa \"%s\" nenalezena\n" + #, fuzzy msgid "Filters are enabled" msgstr "uživatel byl zablokován" @@ -538,19 +542,27 @@ msgid "%sError: configuration option \"%s\" not found" msgstr "%s volba nastavení \"%s\" nenalezena\n" #, fuzzy +msgid "Option changed: " +msgstr "není na kanále" + +#, fuzzy msgid "Option changed" msgstr "není na kanále" #, fuzzy, c-format -msgid "%sOption not found" +msgid "%sOption \"%s\" not found" msgstr "%s plugin \"%s\" nenalezen\n" #, fuzzy -msgid "Option reset" +msgid "Option reset: " msgstr "Možnosti pluginů uloženy\n" #, fuzzy -msgid "Option removed" +msgid "Option reset" +msgstr "Možnosti pluginů uloženy\n" + +#, fuzzy, c-format +msgid "Option \"%s\" removed" msgstr "není na kanále" #, c-format @@ -671,17 +683,16 @@ msgstr "" "posunout o 20 zpráv nahoru: /buffer scroll -20\n" " skočit na #weechat: /buffer #weechat" -#, fuzzy -msgid "launch WeeChat builtin command (do not look at commands hooked)" +msgid "launch explicit WeeChat or plugin command" msgstr "" -"spustit vestavěný WeeChat/IRC příkaz (nedívat se na obsluhovače pluginů nebo " -"aliasy)" -msgid "command" -msgstr "příkaz" +#, fuzzy +msgid "plugin command" +msgstr "Příkazy pluginu:\n" #, fuzzy msgid "" +" plugin: plugin name ('weechat' for WeeChat internal command)\n" "command: command to execute (a '/' is automatically added if not found at " "beginning of command)" msgstr "" @@ -1781,42 +1792,6 @@ msgstr "zavolej další příkaz v historii" msgid "call next command in global history" msgstr "zavolej další příkaz v globální historii" -msgid "scroll one page up" -msgstr "posuň o stránku nahoru" - -msgid "scroll one page down" -msgstr "posuň o stránku dolů" - -msgid "scroll a few lines up" -msgstr "posuň o několik řádek nahoru" - -msgid "scroll a few lines down" -msgstr "posuň o několik řádek dolů" - -msgid "scroll to top of buffer" -msgstr "přesunout na vrch bufferu" - -msgid "scroll to bottom of buffer" -msgstr "přesunout na spodek bufferu" - -msgid "scroll left topic" -msgstr "posunout tématu doleva" - -msgid "scroll right topic" -msgstr "posunout tématu doprava" - -msgid "display beginning of nicklist" -msgstr "zobrazit začátek seznam přezdívek" - -msgid "display end of nicklist" -msgstr "zobrazit konec seznamu přezdívek" - -msgid "scroll nicklist one page up" -msgstr "posuň seznam přezdívek o stránku nahoru" - -msgid "scroll nicklist one page down" -msgstr "posuň seznam přezdívek o stránku dolů" - msgid "jump to buffer with activity" msgstr "skoč na buffer s aktivitou" @@ -1838,12 +1813,6 @@ msgstr "skoč na další server" msgid "switch active server on servers buffer" msgstr "přepnout aktivní server na buffer serverů" -msgid "scroll to previous highlight in buffer" -msgstr "přesunout na předchozí zvýraznění v bufferu" - -msgid "scroll to next highlight in buffer" -msgstr "přesunout na další zvýraznění v bufferu" - msgid "scroll to first unread line in buffer" msgstr "přesunout na první nepřečtenout řádku v bufferu" @@ -1856,9 +1825,6 @@ msgstr "vyčisti hotlist" msgid "clear infobar" msgstr "vyčisti infobar" -msgid "refresh screen" -msgstr "obnov obrazovku" - msgid "grab a key" msgstr "zachytit klávesu" @@ -4544,6 +4510,60 @@ msgid "%s%s: wrong arguments for function \"%s\"" msgstr "%s špatné parametry pro příkaz \"%s\"\n" #, fuzzy +#~ msgid "launch WeeChat builtin command (do not look at commands hooked)" +#~ msgstr "" +#~ "spustit vestavěný WeeChat/IRC příkaz (nedívat se na obsluhovače pluginů " +#~ "nebo aliasy)" + +#~ msgid "command" +#~ msgstr "příkaz" + +#~ msgid "scroll one page up" +#~ msgstr "posuň o stránku nahoru" + +#~ msgid "scroll one page down" +#~ msgstr "posuň o stránku dolů" + +#~ msgid "scroll a few lines up" +#~ msgstr "posuň o několik řádek nahoru" + +#~ msgid "scroll a few lines down" +#~ msgstr "posuň o několik řádek dolů" + +#~ msgid "scroll to top of buffer" +#~ msgstr "přesunout na vrch bufferu" + +#~ msgid "scroll to bottom of buffer" +#~ msgstr "přesunout na spodek bufferu" + +#~ msgid "scroll left topic" +#~ msgstr "posunout tématu doleva" + +#~ msgid "scroll right topic" +#~ msgstr "posunout tématu doprava" + +#~ msgid "display beginning of nicklist" +#~ msgstr "zobrazit začátek seznam přezdívek" + +#~ msgid "display end of nicklist" +#~ msgstr "zobrazit konec seznamu přezdívek" + +#~ msgid "scroll nicklist one page up" +#~ msgstr "posuň seznam přezdívek o stránku nahoru" + +#~ msgid "scroll nicklist one page down" +#~ msgstr "posuň seznam přezdívek o stránku dolů" + +#~ msgid "scroll to previous highlight in buffer" +#~ msgstr "přesunout na předchozí zvýraznění v bufferu" + +#~ msgid "scroll to next highlight in buffer" +#~ msgstr "přesunout na další zvýraznění v bufferu" + +#~ msgid "refresh screen" +#~ msgstr "obnov obrazovku" + +#, fuzzy #~ msgid "# %s, created by %s v%s on %s#\n" #~ msgstr "" #~ "#\n" @@ -4608,10 +4628,6 @@ msgstr "%s špatné parametry pro příkaz \"%s\"\n" #~ msgstr "jméno asociované k IRC serveru (pouze pro zobrazení)" #, fuzzy -#~ msgid "Option changed: " -#~ msgstr "není na kanále" - -#, fuzzy #~ msgid "%sError: incorrect value for option \"%s\"" #~ msgstr "%s nekorektní hodnota pro volbu \"%s\"\n" @@ -5479,10 +5495,6 @@ msgstr "%s špatné parametry pro příkaz \"%s\"\n" #~ msgstr "volba/volby nastavení nalezeny s \"%s\"\n" #, fuzzy -#~ msgid "Plugin commands:" -#~ msgstr "Příkazy pluginu:\n" - -#, fuzzy #~ msgid " (no command handler)" #~ msgstr " (není obsluhovač příkazu)\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-04-15 13:49+0200\n" +"POT-Creation-Date: 2008-04-18 15:36+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" @@ -226,6 +226,10 @@ msgstr "(Hotlist: Hervorhebungen und Nachrichten)\n" msgid "(hotlist: highlights + messages + join/part (all))" msgstr "(Hotlist: Hervorhebungen, Nachrichten, Betreten und Verlassen)\n" +#, fuzzy, c-format +msgid "%sPlugin \"%s\" not found" +msgstr "%s Adresse \"%s\" nicht gefunden\n" + #, fuzzy msgid "Filters are enabled" msgstr "/users wurde deaktiviert" @@ -544,19 +548,27 @@ msgid "%sError: configuration option \"%s\" not found" msgstr "%s Konfigurationsoption \"%s\" nicht gefunden\n" #, fuzzy +msgid "Option changed: " +msgstr "Sie sind nicht im Channel" + +#, fuzzy msgid "Option changed" msgstr "Sie sind nicht im Channel" #, fuzzy, c-format -msgid "%sOption not found" +msgid "%sOption \"%s\" not found" msgstr "%s Plugin \"%s\" nicht gefunden\n" #, fuzzy -msgid "Option reset" +msgid "Option reset: " msgstr "Plugin-Optionen gesichert\n" #, fuzzy -msgid "Option removed" +msgid "Option reset" +msgstr "Plugin-Optionen gesichert\n" + +#, fuzzy, c-format +msgid "Option \"%s\" removed" msgstr "Sie sind nicht im Channel" #, c-format @@ -664,16 +676,16 @@ msgstr "" "Channel: gehe zum Puffer mit Servernamen oder Channelnamen\n" " Nummer: gehe zu Puffer mit dieser Nummer" -#, fuzzy -msgid "launch WeeChat builtin command (do not look at commands hooked)" +msgid "launch explicit WeeChat or plugin command" msgstr "" -"starte eingebauten WeeChat/IRC-Befehl (ohne Plugin-Handler oder Aliase)" -msgid "command" -msgstr "Befehl" +#, fuzzy +msgid "plugin command" +msgstr "Plugin-Befehle:\n" #, fuzzy msgid "" +" plugin: plugin name ('weechat' for WeeChat internal command)\n" "command: command to execute (a '/' is automatically added if not found at " "beginning of command)" msgstr "" @@ -1781,42 +1793,6 @@ msgstr "nächsten Befehl aus dem Verlauf abfragen" msgid "call next command in global history" msgstr "nächsten Befehl aus dem globalen Verlauf abfragen" -msgid "scroll one page up" -msgstr "eine Seite hochscrollen" - -msgid "scroll one page down" -msgstr "eine Seite herunterscrollen" - -msgid "scroll a few lines up" -msgstr "einige Zeilen hochscrollen" - -msgid "scroll a few lines down" -msgstr "einige Zeilen herunterscrollen" - -msgid "scroll to top of buffer" -msgstr "nach ganz oben scrollen" - -msgid "scroll to bottom of buffer" -msgstr "nach ganz unten scrollen" - -msgid "scroll left topic" -msgstr "Topic nach links scrollen" - -msgid "scroll right topic" -msgstr "Topic nach rechts scrollen" - -msgid "display beginning of nicklist" -msgstr "zum Anfang der Nicklist gehen" - -msgid "display end of nicklist" -msgstr "zum Ende der Nicklist gehen" - -msgid "scroll nicklist one page up" -msgstr "Nickliste eine Seite hochscrollen" - -msgid "scroll nicklist one page down" -msgstr "Nickliste eine Seite herunterscrollen" - msgid "jump to buffer with activity" msgstr "zu nächstem aktiven Puffer springen" @@ -1839,12 +1815,6 @@ msgstr "zum nächsten Server springen" msgid "switch active server on servers buffer" msgstr "wechsel den aktiven Server im Server-Puffer" -msgid "scroll to previous highlight in buffer" -msgstr "scrolle zur vorherigen hervorhebung im Puffer" - -msgid "scroll to next highlight in buffer" -msgstr "scrolle zur nächsten Hervorhebung im Puffer" - msgid "scroll to first unread line in buffer" msgstr "scrolle zur ersten, ungelesenen Zeile im Puffer" @@ -1858,9 +1828,6 @@ msgstr "Hotlist leeren" msgid "clear infobar" msgstr "Infobar leeren" -msgid "refresh screen" -msgstr "Bild neu aufbauen" - msgid "grab a key" msgstr "Tastencode ermitteln und einfügen" @@ -4535,6 +4502,59 @@ msgid "%s%s: wrong arguments for function \"%s\"" msgstr "%s fehlerhafte Argumente für der \"%s\"-Befehl\n" #, fuzzy +#~ msgid "launch WeeChat builtin command (do not look at commands hooked)" +#~ msgstr "" +#~ "starte eingebauten WeeChat/IRC-Befehl (ohne Plugin-Handler oder Aliase)" + +#~ msgid "command" +#~ msgstr "Befehl" + +#~ msgid "scroll one page up" +#~ msgstr "eine Seite hochscrollen" + +#~ msgid "scroll one page down" +#~ msgstr "eine Seite herunterscrollen" + +#~ msgid "scroll a few lines up" +#~ msgstr "einige Zeilen hochscrollen" + +#~ msgid "scroll a few lines down" +#~ msgstr "einige Zeilen herunterscrollen" + +#~ msgid "scroll to top of buffer" +#~ msgstr "nach ganz oben scrollen" + +#~ msgid "scroll to bottom of buffer" +#~ msgstr "nach ganz unten scrollen" + +#~ msgid "scroll left topic" +#~ msgstr "Topic nach links scrollen" + +#~ msgid "scroll right topic" +#~ msgstr "Topic nach rechts scrollen" + +#~ msgid "display beginning of nicklist" +#~ msgstr "zum Anfang der Nicklist gehen" + +#~ msgid "display end of nicklist" +#~ msgstr "zum Ende der Nicklist gehen" + +#~ msgid "scroll nicklist one page up" +#~ msgstr "Nickliste eine Seite hochscrollen" + +#~ msgid "scroll nicklist one page down" +#~ msgstr "Nickliste eine Seite herunterscrollen" + +#~ msgid "scroll to previous highlight in buffer" +#~ msgstr "scrolle zur vorherigen hervorhebung im Puffer" + +#~ msgid "scroll to next highlight in buffer" +#~ msgstr "scrolle zur nächsten Hervorhebung im Puffer" + +#~ msgid "refresh screen" +#~ msgstr "Bild neu aufbauen" + +#, fuzzy #~ msgid "# %s, created by %s v%s on %s#\n" #~ msgstr "" #~ "#\n" @@ -4599,10 +4619,6 @@ msgstr "%s fehlerhafte Argumente für der \"%s\"-Befehl\n" #~ msgstr "mit dem IRC-Server assoziierter eindeutiger Name (nur zur Anzeige)" #, fuzzy -#~ msgid "Option changed: " -#~ msgstr "Sie sind nicht im Channel" - -#, fuzzy #~ msgid "%sError: incorrect value for option \"%s\"" #~ msgstr "%s ungültiger Wert für die Option \"%s\"\n" @@ -5474,10 +5490,6 @@ msgstr "%s fehlerhafte Argumente für der \"%s\"-Befehl\n" #~ msgstr "Konfigurationsoption(en) gefunden mit \"%s\"\n" #, fuzzy -#~ msgid "Plugin commands:" -#~ msgstr "Plugin-Befehle:\n" - -#, fuzzy #~ msgid " (no command handler)" #~ msgstr " (kein Befehls-Handler)\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-04-15 13:49+0200\n" +"POT-Creation-Date: 2008-04-18 15:36+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" @@ -222,6 +222,10 @@ msgstr "(hotlist: resaltados + mensajes)\n" msgid "(hotlist: highlights + messages + join/part (all))" msgstr "(hotlist: resaltados + mensajes + join/part (todos))\n" +#, fuzzy, c-format +msgid "%sPlugin \"%s\" not found" +msgstr "%s dirección \"%s\" no encontrada\n" + #, fuzzy msgid "Filters are enabled" msgstr "los usuarios han sido desactivados" @@ -539,19 +543,27 @@ msgid "%sError: configuration option \"%s\" not found" msgstr "%s opción de configuración \"%s\" no encontrada\n" #, fuzzy +msgid "Option changed: " +msgstr "no presente en el canal" + +#, fuzzy msgid "Option changed" msgstr "no presente en el canal" #, fuzzy, c-format -msgid "%sOption not found" +msgid "%sOption \"%s\" not found" msgstr "%s plugin \"%s\" no encontrado\n" #, fuzzy -msgid "Option reset" +msgid "Option reset: " msgstr "opción/opciones de plugin encontrada(s)\n" #, fuzzy -msgid "Option removed" +msgid "Option reset" +msgstr "opción/opciones de plugin encontrada(s)\n" + +#, fuzzy, c-format +msgid "Option \"%s\" removed" msgstr "no presente en el canal" #, c-format @@ -660,17 +672,16 @@ msgstr "" " canal: saltar al búfer por el nombre del servidor o canal\n" " número: saltar al búfer por número" -#, fuzzy -msgid "launch WeeChat builtin command (do not look at commands hooked)" +msgid "launch explicit WeeChat or plugin command" msgstr "" -"lanzar el comando de construcción de Weechat/IRC (no mira los manejadores " -"de plugins ni los alias)" -msgid "command" -msgstr "comando" +#, fuzzy +msgid "plugin command" +msgstr "Comandos de plugin:\n" #, fuzzy msgid "" +" plugin: plugin name ('weechat' for WeeChat internal command)\n" "command: command to execute (a '/' is automatically added if not found at " "beginning of command)" msgstr "" @@ -1768,43 +1779,6 @@ msgstr "llamar al comando siguiente en el historial" msgid "call next command in global history" msgstr "llamar al comando siguiente en el historial global" -msgid "scroll one page up" -msgstr "desplazarse una página hacia arriba" - -msgid "scroll one page down" -msgstr "desplazarse una página hacia abajo" - -msgid "scroll a few lines up" -msgstr "desplazarse unas páginas hacia arriba" - -msgid "scroll a few lines down" -msgstr "desplazarse unas páginas hacia abajo" - -msgid "scroll to top of buffer" -msgstr "desplazarse al principio del búfer" - -msgid "scroll to bottom of buffer" -msgstr "desplazarse al final del búfer" - -#, fuzzy -msgid "scroll left topic" -msgstr "desplazarse al principio del búfer" - -msgid "scroll right topic" -msgstr "" - -msgid "display beginning of nicklist" -msgstr "mostrar el principio de la lista de nicks" - -msgid "display end of nicklist" -msgstr "mostrar el final de la lista de nicks" - -msgid "scroll nicklist one page up" -msgstr "desplazar la lista de nicks una página hacia arriba" - -msgid "scroll nicklist one page down" -msgstr "desplazar la lista de nicks una página hacia abajo" - msgid "jump to buffer with activity" msgstr "saltar al búfer con actividad" @@ -1827,12 +1801,6 @@ msgstr "saltar al servidor siguiente" msgid "switch active server on servers buffer" msgstr "seleccionar servidor activo en el búfer de servidores" -msgid "scroll to previous highlight in buffer" -msgstr "desplazarse al resaltado anterior en el búfer" - -msgid "scroll to next highlight in buffer" -msgstr "desplazarse al resaltado siguiente en el búfer" - msgid "scroll to first unread line in buffer" msgstr "desplazarse a la primera lÃnea sin leer en el búfer" @@ -1846,9 +1814,6 @@ msgstr "limpiar hotlist" msgid "clear infobar" msgstr "limpiar barra de información" -msgid "refresh screen" -msgstr "recargar la pantalla" - msgid "grab a key" msgstr "capturar una clave" @@ -4549,6 +4514,58 @@ msgid "%s%s: wrong arguments for function \"%s\"" msgstr "%s argumentos incorrectos para el comando \"%s\"\n" #, fuzzy +#~ msgid "launch WeeChat builtin command (do not look at commands hooked)" +#~ msgstr "" +#~ "lanzar el comando de construcción de Weechat/IRC (no mira los " +#~ "manejadores de plugins ni los alias)" + +#~ msgid "command" +#~ msgstr "comando" + +#~ msgid "scroll one page up" +#~ msgstr "desplazarse una página hacia arriba" + +#~ msgid "scroll one page down" +#~ msgstr "desplazarse una página hacia abajo" + +#~ msgid "scroll a few lines up" +#~ msgstr "desplazarse unas páginas hacia arriba" + +#~ msgid "scroll a few lines down" +#~ msgstr "desplazarse unas páginas hacia abajo" + +#~ msgid "scroll to top of buffer" +#~ msgstr "desplazarse al principio del búfer" + +#~ msgid "scroll to bottom of buffer" +#~ msgstr "desplazarse al final del búfer" + +#, fuzzy +#~ msgid "scroll left topic" +#~ msgstr "desplazarse al principio del búfer" + +#~ msgid "display beginning of nicklist" +#~ msgstr "mostrar el principio de la lista de nicks" + +#~ msgid "display end of nicklist" +#~ msgstr "mostrar el final de la lista de nicks" + +#~ msgid "scroll nicklist one page up" +#~ msgstr "desplazar la lista de nicks una página hacia arriba" + +#~ msgid "scroll nicklist one page down" +#~ msgstr "desplazar la lista de nicks una página hacia abajo" + +#~ msgid "scroll to previous highlight in buffer" +#~ msgstr "desplazarse al resaltado anterior en el búfer" + +#~ msgid "scroll to next highlight in buffer" +#~ msgstr "desplazarse al resaltado siguiente en el búfer" + +#~ msgid "refresh screen" +#~ msgstr "recargar la pantalla" + +#, fuzzy #~ msgid "# %s, created by %s v%s on %s#\n" #~ msgstr "" #~ "#\n" @@ -4615,10 +4632,6 @@ msgstr "%s argumentos incorrectos para el comando \"%s\"\n" #~ msgstr "nombre asociado al servidor IRC (para mostrar solamente)" #, fuzzy -#~ msgid "Option changed: " -#~ msgstr "no presente en el canal" - -#, fuzzy #~ msgid "%sError: incorrect value for option \"%s\"" #~ msgstr "%s valor incorrecto para la opción \"%s\"\n" @@ -5503,10 +5516,6 @@ msgstr "%s argumentos incorrectos para el comando \"%s\"\n" #~ msgstr "opción/opciones de configuración encontrada(s) con \"%s\"\n" #, fuzzy -#~ msgid "Plugin commands:" -#~ msgstr "Comandos de plugin:\n" - -#, fuzzy #~ msgid " (no command handler)" #~ msgstr " (sin manejador de comando)\n" @@ -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-04-15 13:49+0200\n" -"PO-Revision-Date: 2008-04-14 18:43+0200\n" +"POT-Creation-Date: 2008-04-18 15:36+0200\n" +"PO-Revision-Date: 2008-04-18 15:36+0200\n" "Last-Translator: FlashCode <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "MIME-Version: 1.0\n" @@ -208,6 +208,10 @@ msgstr "(hotlist: highlights + messages)" msgid "(hotlist: highlights + messages + join/part (all))" msgstr "(hotlist: highlights + messages + join/part (tous))" +#, c-format +msgid "%sPlugin \"%s\" not found" +msgstr "%sExtension \"%s\" non trouvée" + msgid "Filters are enabled" msgstr "Les filtres sont activés" @@ -494,18 +498,25 @@ msgstr "%sErreur: impossible de modifier l'option \"%s\"" msgid "%sError: configuration option \"%s\" not found" msgstr "%sErreur: option de configuration \"%s\" non trouvée" +msgid "Option changed: " +msgstr "Option modifiée: " + msgid "Option changed" msgstr "Option modifiée" #, c-format -msgid "%sOption not found" -msgstr "%sOption non trouvée" +msgid "%sOption \"%s\" not found" +msgstr "%sOption \"%s\" non trouvée" + +msgid "Option reset: " +msgstr "Option réinitialisée: " msgid "Option reset" msgstr "Option réinitialisée" -msgid "Option removed" -msgstr "Option supprimée" +#, c-format +msgid "Option \"%s\" removed" +msgstr "Option \"%s\" supprimée" #, c-format msgid "WeeChat uptime: %d %s %02d:%02d:%02d, started on %s" @@ -641,18 +652,19 @@ msgstr "" "défiler 20 msgs haut: /buffer scroll -20\n" " aller sur #weechat: /buffer #weechat" -msgid "launch WeeChat builtin command (do not look at commands hooked)" -msgstr "" -"lance une commande WeeChat interne (sans regarder les commandes accrochées)" +msgid "launch explicit WeeChat or plugin command" +msgstr "lancer explicitement une commande WeeChat ou d'une extension" -msgid "command" -msgstr "commande" +msgid "plugin command" +msgstr "extension commande" msgid "" +" plugin: plugin name ('weechat' for WeeChat internal command)\n" "command: command to execute (a '/' is automatically added if not found at " "beginning of command)" msgstr "" -"commande: commande à exécuter (un '/' est automatiquement ajouté s'il n'est " +"extension: nom de l'extension ('weechat' pour une commande interne WeeChat)\n" +" commande: commande à exécuter (un '/' est automatiquement ajouté s'il n'est " "pas trouvé au début de la commande)" msgid "" @@ -1705,42 +1717,6 @@ msgstr "appeler la commande suivante dans l'historique" msgid "call next command in global history" msgstr "appeler la commande suivante dans l'historique global" -msgid "scroll one page up" -msgstr "faire défiler d'une page vers le haut" - -msgid "scroll one page down" -msgstr "faire défiler d'une page vers le bas" - -msgid "scroll a few lines up" -msgstr "faire défiler de quelques lignes vers le haut" - -msgid "scroll a few lines down" -msgstr "faire défiler de quelques lignes vers le bas" - -msgid "scroll to top of buffer" -msgstr "faire défiler jusqu'au début du tampon" - -msgid "scroll to bottom of buffer" -msgstr "faire défiler jusqu'à la fin du tampon" - -msgid "scroll left topic" -msgstr "faire défiler le titre vers la gauche" - -msgid "scroll right topic" -msgstr "faire défiler le titre vers la droite" - -msgid "display beginning of nicklist" -msgstr "afficher le début de la liste des pseudos" - -msgid "display end of nicklist" -msgstr "afficher la fin de la liste des pseudos" - -msgid "scroll nicklist one page up" -msgstr "faire défiler la liste des pseudos d'une page vers le haut" - -msgid "scroll nicklist one page down" -msgstr "faire défiler la liste des pseudos d'une page vers le bas" - msgid "jump to buffer with activity" msgstr "sauter au tampon avec de l'activité" @@ -1762,12 +1738,6 @@ msgstr "sauter au prochain serveur" msgid "switch active server on servers buffer" msgstr "bascule de serveur actif sur le tampon des serveurs" -msgid "scroll to previous highlight in buffer" -msgstr "faire défiler jusqu'au highlight précédent du tampon" - -msgid "scroll to next highlight in buffer" -msgstr "faire défiler jusqu'au highlight suivant du tampon" - msgid "scroll to first unread line in buffer" msgstr "faire défiler jusqu'à la première ligne non lue du tampon" @@ -1780,9 +1750,6 @@ msgstr "effacer la liste d'activité" msgid "clear infobar" msgstr "effacer la barre d'infos" -msgid "refresh screen" -msgstr "rafraîchir l'écran" - msgid "grab a key" msgstr "capturer une touche" @@ -4495,3 +4462,11 @@ msgstr "" #, c-format msgid "%s%s: wrong arguments for function \"%s\"" msgstr "%s%s: paramètres invalides pour la fonction \"%s\"" + +#~ msgid "launch WeeChat builtin command (do not look at commands hooked)" +#~ msgstr "" +#~ "lance une commande WeeChat interne (sans regarder les commandes " +#~ "accrochées)" + +#~ msgid "command" +#~ msgstr "commande" @@ -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-04-15 13:49+0200\n" +"POT-Creation-Date: 2008-04-18 15:36+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" @@ -225,6 +225,10 @@ msgstr "" msgid "(hotlist: highlights + messages + join/part (all))" msgstr "" +#, fuzzy, c-format +msgid "%sPlugin \"%s\" not found" +msgstr "%s cím \"%s\" nem található\n" + #, fuzzy msgid "Filters are enabled" msgstr "a felhasználók le lettek tiltva" @@ -543,19 +547,27 @@ msgid "%sError: configuration option \"%s\" not found" msgstr "%s a \"%s\" opció nem található\n" #, fuzzy +msgid "Option changed: " +msgstr "nincs a szobában" + +#, fuzzy msgid "Option changed" msgstr "nincs a szobában" #, fuzzy, c-format -msgid "%sOption not found" +msgid "%sOption \"%s\" not found" msgstr "%s a \"%s\" modul nem található\n" #, fuzzy -msgid "Option reset" +msgid "Option reset: " msgstr "Modul beállítások elmentve\n" #, fuzzy -msgid "Option removed" +msgid "Option reset" +msgstr "Modul beállítások elmentve\n" + +#, fuzzy, c-format +msgid "Option \"%s\" removed" msgstr "nincs a szobában" #, c-format @@ -677,17 +689,16 @@ msgstr "" " ugrás 20 sorral feljebb: /buffer scroll -20\n" " ugrás a #weechat szobára: /buffer #weechat" -#, fuzzy -msgid "launch WeeChat builtin command (do not look at commands hooked)" +msgid "launch explicit WeeChat or plugin command" msgstr "" -"WeeChat/IRC beépített parancs indítása (ne keressen a modulkezelők vagy " -"aliaszok között)" -msgid "command" -msgstr "parancs" +#, fuzzy +msgid "plugin command" +msgstr "Modul parancsok:\n" #, fuzzy msgid "" +" plugin: plugin name ('weechat' for WeeChat internal command)\n" "command: command to execute (a '/' is automatically added if not found at " "beginning of command)" msgstr "" @@ -1784,42 +1795,6 @@ msgstr "kövezkező parancs hívása az előzményekből" msgid "call next command in global history" msgstr "következő parancs hívása a globális előzményekből" -msgid "scroll one page up" -msgstr "ugrás egy oldallal feljebb" - -msgid "scroll one page down" -msgstr "ugrás egy oldallal lejjebb" - -msgid "scroll a few lines up" -msgstr "ugrás néhány sorral feljebb" - -msgid "scroll a few lines down" -msgstr "ugrás néhány sorral lejjebb" - -msgid "scroll to top of buffer" -msgstr "ugrás a puffer tetejére" - -msgid "scroll to bottom of buffer" -msgstr "ugrás a puffer végére" - -msgid "scroll left topic" -msgstr "téma görgetése balra" - -msgid "scroll right topic" -msgstr "téma görgetése jobbra" - -msgid "display beginning of nicklist" -msgstr "névlista elejének mutatása" - -msgid "display end of nicklist" -msgstr "névlista végének mutatása" - -msgid "scroll nicklist one page up" -msgstr "névlista görgetése egy oldallal feljebb" - -msgid "scroll nicklist one page down" -msgstr "névlista görgetése egy oldallal lejjebb" - msgid "jump to buffer with activity" msgstr "ugrás aktív pufferre" @@ -1841,12 +1816,6 @@ msgstr "ugrás a következő szerverre" msgid "switch active server on servers buffer" msgstr "aktív szerverek változtatása a szerver pufferben" -msgid "scroll to previous highlight in buffer" -msgstr "ugrás az előző kiemelésre a pufferben" - -msgid "scroll to next highlight in buffer" -msgstr "ugrás a következő kiemelésre a pufferben" - msgid "scroll to first unread line in buffer" msgstr "ugrás az első olvasatlan sorra a pufferben" @@ -1859,9 +1828,6 @@ msgstr "hotlist törlése" msgid "clear infobar" msgstr "információs pult törlése" -msgid "refresh screen" -msgstr "képernyő frissítése" - msgid "grab a key" msgstr "vállasszon billentyűt" @@ -4551,6 +4517,60 @@ msgid "%s%s: wrong arguments for function \"%s\"" msgstr "%s rossz argumentum a \"%s\" parancsnak\n" #, fuzzy +#~ msgid "launch WeeChat builtin command (do not look at commands hooked)" +#~ msgstr "" +#~ "WeeChat/IRC beépített parancs indítása (ne keressen a modulkezelők vagy " +#~ "aliaszok között)" + +#~ msgid "command" +#~ msgstr "parancs" + +#~ msgid "scroll one page up" +#~ msgstr "ugrás egy oldallal feljebb" + +#~ msgid "scroll one page down" +#~ msgstr "ugrás egy oldallal lejjebb" + +#~ msgid "scroll a few lines up" +#~ msgstr "ugrás néhány sorral feljebb" + +#~ msgid "scroll a few lines down" +#~ msgstr "ugrás néhány sorral lejjebb" + +#~ msgid "scroll to top of buffer" +#~ msgstr "ugrás a puffer tetejére" + +#~ msgid "scroll to bottom of buffer" +#~ msgstr "ugrás a puffer végére" + +#~ msgid "scroll left topic" +#~ msgstr "téma görgetése balra" + +#~ msgid "scroll right topic" +#~ msgstr "téma görgetése jobbra" + +#~ msgid "display beginning of nicklist" +#~ msgstr "névlista elejének mutatása" + +#~ msgid "display end of nicklist" +#~ msgstr "névlista végének mutatása" + +#~ msgid "scroll nicklist one page up" +#~ msgstr "névlista görgetése egy oldallal feljebb" + +#~ msgid "scroll nicklist one page down" +#~ msgstr "névlista görgetése egy oldallal lejjebb" + +#~ msgid "scroll to previous highlight in buffer" +#~ msgstr "ugrás az előző kiemelésre a pufferben" + +#~ msgid "scroll to next highlight in buffer" +#~ msgstr "ugrás a következő kiemelésre a pufferben" + +#~ msgid "refresh screen" +#~ msgstr "képernyő frissítése" + +#, fuzzy #~ msgid "# %s, created by %s v%s on %s#\n" #~ msgstr "" #~ "#\n" @@ -4615,10 +4635,6 @@ msgstr "%s rossz argumentum a \"%s\" parancsnak\n" #~ msgstr "az IRC szerverhez rendelt név (csak megjelenítéshez)" #, fuzzy -#~ msgid "Option changed: " -#~ msgstr "nincs a szobában" - -#, fuzzy #~ msgid "%sError: incorrect value for option \"%s\"" #~ msgstr "%s helytelen érték a \"%s\" paraméternek\n" @@ -5472,10 +5488,6 @@ msgstr "%s rossz argumentum a \"%s\" parancsnak\n" #~ msgstr "a \"%s\" kifejezéshez tartozó opciót találtam\n" #, fuzzy -#~ msgid "Plugin commands:" -#~ msgstr "Modul parancsok:\n" - -#, fuzzy #~ msgid " (no command handler)" #~ msgstr " (nincs parancskezelő)\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-04-15 13:49+0200\n" +"POT-Creation-Date: 2008-04-18 15:36+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" @@ -223,6 +223,10 @@ msgstr "(hotlist: подсвечивание + сообщения)\n" msgid "(hotlist: highlights + messages + join/part (all))" msgstr "(хотлист: подсвечивание + сообщения + входы/выходы (всё))\n" +#, fuzzy, c-format +msgid "%sPlugin \"%s\" not found" +msgstr "%s адрес \"%s\" не найден\n" + #, fuzzy msgid "Filters are enabled" msgstr "команда users отключена" @@ -540,19 +544,27 @@ msgid "%sError: configuration option \"%s\" not found" msgstr "%s параметр конфигурации \"%s\" не найден\n" #, fuzzy +msgid "Option changed: " +msgstr "не на канале" + +#, fuzzy msgid "Option changed" msgstr "не на канале" #, fuzzy, c-format -msgid "%sOption not found" +msgid "%sOption \"%s\" not found" msgstr "%s plugin \"%s\" не найден\n" #, fuzzy -msgid "Option reset" +msgid "Option reset: " msgstr "Настройки pluginов сохранены\n" #, fuzzy -msgid "Option removed" +msgid "Option reset" +msgstr "Настройки pluginов сохранены\n" + +#, fuzzy, c-format +msgid "Option \"%s\" removed" msgstr "не на канале" #, c-format @@ -673,16 +685,16 @@ msgstr "" " отмотать 20 сообщений: /buffer scroll -20\n" " перейти к #weechat: /buffer #weechat" -#, fuzzy -msgid "launch WeeChat builtin command (do not look at commands hooked)" +msgid "launch explicit WeeChat or plugin command" msgstr "" -"вызвать встроенную команду WeeChat/IRC (не использовать pluginы и сокращения)" -msgid "command" -msgstr "команда" +#, fuzzy +msgid "plugin command" +msgstr "Команды Plugin'ов:\n" #, fuzzy msgid "" +" plugin: plugin name ('weechat' for WeeChat internal command)\n" "command: command to execute (a '/' is automatically added if not found at " "beginning of command)" msgstr "" @@ -1789,42 +1801,6 @@ msgstr "вызвать следующую команду из истории" msgid "call next command in global history" msgstr "вызвать следующую команду из глобальной истории" -msgid "scroll one page up" -msgstr "промотать 1 страницу вверх" - -msgid "scroll one page down" -msgstr "промотать 1 страницу вниз" - -msgid "scroll a few lines up" -msgstr "промотать на несколько строк вверх" - -msgid "scroll a few lines down" -msgstr "промотать на несколько строк вниз" - -msgid "scroll to top of buffer" -msgstr "перемотать на начало буфера" - -msgid "scroll to bottom of buffer" -msgstr "перемотать на конец буфера" - -msgid "scroll left topic" -msgstr "перемотать тему влево" - -msgid "scroll right topic" -msgstr "перемотать тему вправо" - -msgid "display beginning of nicklist" -msgstr "показать начало списка ников" - -msgid "display end of nicklist" -msgstr "показать конец списка ников" - -msgid "scroll nicklist one page up" -msgstr "промотать список ников на 1 страницу вверх" - -msgid "scroll nicklist one page down" -msgstr "промотать список ников на 1 страницу вниз" - msgid "jump to buffer with activity" msgstr "перейти к буферу с активностью:" @@ -1846,12 +1822,6 @@ msgstr "перейти к следующему буферу" msgid "switch active server on servers buffer" msgstr "перейти к активному серверу в буфере серверов" -msgid "scroll to previous highlight in buffer" -msgstr "промотать буфер до предыдущей подсветки" - -msgid "scroll to next highlight in buffer" -msgstr "промотать буфер до следующей подсветки" - msgid "scroll to first unread line in buffer" msgstr "перейти к первой непрочитанной строчке буфера" @@ -1864,9 +1834,6 @@ msgstr "очистить хотлист" msgid "clear infobar" msgstr "очистить информационную панель" -msgid "refresh screen" -msgstr "обновить экран" - msgid "grab a key" msgstr "захватить клавишу" @@ -4534,6 +4501,60 @@ msgid "%s%s: wrong arguments for function \"%s\"" msgstr "%s некорректные аргументы команды \"%s\"\n" #, fuzzy +#~ msgid "launch WeeChat builtin command (do not look at commands hooked)" +#~ msgstr "" +#~ "вызвать встроенную команду WeeChat/IRC (не использовать pluginы и " +#~ "сокращения)" + +#~ msgid "command" +#~ msgstr "команда" + +#~ msgid "scroll one page up" +#~ msgstr "промотать 1 страницу вверх" + +#~ msgid "scroll one page down" +#~ msgstr "промотать 1 страницу вниз" + +#~ msgid "scroll a few lines up" +#~ msgstr "промотать на несколько строк вверх" + +#~ msgid "scroll a few lines down" +#~ msgstr "промотать на несколько строк вниз" + +#~ msgid "scroll to top of buffer" +#~ msgstr "перемотать на начало буфера" + +#~ msgid "scroll to bottom of buffer" +#~ msgstr "перемотать на конец буфера" + +#~ msgid "scroll left topic" +#~ msgstr "перемотать тему влево" + +#~ msgid "scroll right topic" +#~ msgstr "перемотать тему вправо" + +#~ msgid "display beginning of nicklist" +#~ msgstr "показать начало списка ников" + +#~ msgid "display end of nicklist" +#~ msgstr "показать конец списка ников" + +#~ msgid "scroll nicklist one page up" +#~ msgstr "промотать список ников на 1 страницу вверх" + +#~ msgid "scroll nicklist one page down" +#~ msgstr "промотать список ников на 1 страницу вниз" + +#~ msgid "scroll to previous highlight in buffer" +#~ msgstr "промотать буфер до предыдущей подсветки" + +#~ msgid "scroll to next highlight in buffer" +#~ msgstr "промотать буфер до следующей подсветки" + +#~ msgid "refresh screen" +#~ msgstr "обновить экран" + +#, fuzzy #~ msgid "# %s, created by %s v%s on %s#\n" #~ msgstr "" #~ "#\n" @@ -4598,10 +4619,6 @@ msgstr "%s некорректные аргументы команды \"%s\"\n" #~ msgstr "имя IRC сервера (для внутреннего пользования)" #, fuzzy -#~ msgid "Option changed: " -#~ msgstr "не на канале" - -#, fuzzy #~ msgid "%sError: incorrect value for option \"%s\"" #~ msgstr "%s некорректное значение параметра \"%s\"\n" @@ -5477,10 +5494,6 @@ msgstr "%s некорректные аргументы команды \"%s\"\n" #~ msgstr "параметров с \"%s\" найдено\n" #, fuzzy -#~ msgid "Plugin commands:" -#~ msgstr "Команды Plugin'ов:\n" - -#, fuzzy #~ msgid " (no command handler)" #~ msgstr " (нет обработчиков команд)\n" diff --git a/po/weechat.pot b/po/weechat.pot index 7b00cc2d6..2f7849a15 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-04-15 13:49+0200\n" +"POT-Creation-Date: 2008-04-18 15:36+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" @@ -191,6 +191,10 @@ msgstr "" msgid "(hotlist: highlights + messages + join/part (all))" msgstr "" +#, c-format +msgid "%sPlugin \"%s\" not found" +msgstr "" + msgid "Filters are enabled" msgstr "" @@ -471,17 +475,24 @@ msgstr "" msgid "%sError: configuration option \"%s\" not found" msgstr "" +msgid "Option changed: " +msgstr "" + msgid "Option changed" msgstr "" #, c-format -msgid "%sOption not found" +msgid "%sOption \"%s\" not found" +msgstr "" + +msgid "Option reset: " msgstr "" msgid "Option reset" msgstr "" -msgid "Option removed" +#, c-format +msgid "Option \"%s\" removed" msgstr "" #, c-format @@ -570,13 +581,14 @@ msgid "" " jump to #weechat: /buffer #weechat" msgstr "" -msgid "launch WeeChat builtin command (do not look at commands hooked)" +msgid "launch explicit WeeChat or plugin command" msgstr "" -msgid "command" +msgid "plugin command" msgstr "" msgid "" +" plugin: plugin name ('weechat' for WeeChat internal command)\n" "command: command to execute (a '/' is automatically added if not found at " "beginning of command)" msgstr "" @@ -1476,42 +1488,6 @@ msgstr "" msgid "call next command in global history" msgstr "" -msgid "scroll one page up" -msgstr "" - -msgid "scroll one page down" -msgstr "" - -msgid "scroll a few lines up" -msgstr "" - -msgid "scroll a few lines down" -msgstr "" - -msgid "scroll to top of buffer" -msgstr "" - -msgid "scroll to bottom of buffer" -msgstr "" - -msgid "scroll left topic" -msgstr "" - -msgid "scroll right topic" -msgstr "" - -msgid "display beginning of nicklist" -msgstr "" - -msgid "display end of nicklist" -msgstr "" - -msgid "scroll nicklist one page up" -msgstr "" - -msgid "scroll nicklist one page down" -msgstr "" - msgid "jump to buffer with activity" msgstr "" @@ -1533,12 +1509,6 @@ msgstr "" msgid "switch active server on servers buffer" msgstr "" -msgid "scroll to previous highlight in buffer" -msgstr "" - -msgid "scroll to next highlight in buffer" -msgstr "" - msgid "scroll to first unread line in buffer" msgstr "" @@ -1551,9 +1521,6 @@ msgstr "" msgid "clear infobar" msgstr "" -msgid "refresh screen" -msgstr "" - msgid "grab a key" msgstr "" diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 83324ee05..a1d4558b0 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -561,33 +561,46 @@ command_buffer (void *data, struct t_gui_buffer *buffer, } /* - * command_builtin: launch WeeChat builtin command + * command_command: launch explicit WeeChat or plugin command */ int -command_builtin (void *data, struct t_gui_buffer *buffer, +command_command (void *data, struct t_gui_buffer *buffer, int argc, char **argv, char **argv_eol) { - char *command; int length; + char *command; + struct t_weechat_plugin *ptr_plugin; /* make C compiler happy */ (void) data; - if (argc > 1) + if (argc > 2) { - if (argv[1][0] == '/') + ptr_plugin = NULL; + if (string_strcasecmp (argv[1], "weechat") != 0) + { + ptr_plugin = plugin_search (argv[1]); + if (!ptr_plugin) + { + gui_chat_printf (NULL, _("%sPlugin \"%s\" not found"), + gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], + argv[1]); + return WEECHAT_RC_ERROR; + } + } + if (argv_eol[2][0] == '/') { - input_data (buffer, argv_eol[1], 1); + input_exec_command (buffer, 0, ptr_plugin, argv_eol[2]); } else { - length = strlen (argv_eol[1]) + 2; + length = strlen (argv_eol[2]) + 2; command = malloc (length); if (command) { - snprintf (command, length, "/%s", argv_eol[1]); - input_data (buffer, command, 1); + snprintf (command, length, "/%s", argv_eol[2]); + input_exec_command (buffer, 0, ptr_plugin, command); free (command); } } @@ -2142,7 +2155,7 @@ command_uptime (void *data, struct t_gui_buffer *buffer, sec, ctime (&weechat_start_time)); string[strlen (string) - 1] = '\0'; - input_data (buffer, string, 0); + input_data (buffer, string); } else { @@ -2504,14 +2517,15 @@ command_init () " jump to #weechat: /buffer #weechat"), "clear|move|close|list|notify|scroll|set|%b|%c %b|%c", &command_buffer, NULL); - hook_command (NULL, "builtin", - N_("launch WeeChat builtin command (do not look at commands " - "hooked)"), - N_("command"), - N_("command: command to execute (a '/' is automatically " + hook_command (NULL, "command", + N_("launch explicit WeeChat or plugin command"), + N_("plugin command"), + N_(" plugin: plugin name ('weechat' for WeeChat internal " + "command)\n" + "command: command to execute (a '/' is automatically " "added if not found at beginning of command)"), - "%w", - &command_builtin, NULL); + "%p|weechat %P", + &command_command, NULL); hook_command (NULL, "filter", N_("filter messages in buffers, to hide/show them according " "to tags or regex"), @@ -2681,7 +2695,7 @@ command_startup (int plugins_loaded) weechat_buffer = gui_buffer_search_main (); for (ptr_cmd = commands; *ptr_cmd; ptr_cmd++) { - input_data (weechat_buffer, *ptr_cmd, 0); + input_data (weechat_buffer, *ptr_cmd); } string_free_splitted_command (commands); } diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c index a9f43f990..65f36de39 100644 --- a/src/core/wee-hook.c +++ b/src/core/wee-hook.c @@ -366,15 +366,22 @@ hook_command (struct t_weechat_plugin *plugin, char *command, char *description, * return: 0 if command executed and failed * 1 if command executed successfully * -1 if command not found + * -2 if command is ambigous (same command exists + * for another plugin, and we don't know which + * one to run) */ int -hook_command_exec (struct t_gui_buffer *buffer, char *string, int only_builtin) +hook_command_exec (struct t_gui_buffer *buffer, int any_plugin, + struct t_weechat_plugin *plugin, char *string) { struct t_hook *ptr_hook, *next_hook; + struct t_hook *hook_for_plugin, *hook_for_other_plugin; char **argv, **argv_eol; int argc, rc; + rc = -1; + if (!buffer || !string || !string[0]) return -1; @@ -388,6 +395,8 @@ hook_command_exec (struct t_gui_buffer *buffer, char *string, int only_builtin) hook_exec_start (); + hook_for_plugin = NULL; + hook_for_other_plugin = NULL; ptr_hook = weechat_hooks[HOOK_TYPE_COMMAND]; while (ptr_hook) { @@ -395,37 +404,56 @@ hook_command_exec (struct t_gui_buffer *buffer, char *string, int only_builtin) if (!ptr_hook->deleted && !ptr_hook->running - && (HOOK_COMMAND(ptr_hook, level) == 0) - && (!only_builtin || !ptr_hook->plugin) - /*&& (!ptr_hook->plugin - || !buffer->plugin - || (buffer->plugin == ptr_hook->plugin))*/ + && ((!any_plugin || HOOK_COMMAND(ptr_hook, level) == 0)) && (string_strcasecmp (argv[0] + 1, HOOK_COMMAND(ptr_hook, command)) == 0)) { - ptr_hook->running = 1; - rc = (int) (HOOK_COMMAND(ptr_hook, callback)) - (ptr_hook->callback_data, buffer, argc, argv, argv_eol); - ptr_hook->running = 0; - string_free_exploded (argv); - string_free_exploded (argv_eol); - hook_exec_end (); - if (rc == WEECHAT_RC_ERROR) - return 0; + if (ptr_hook->plugin == plugin) + { + if (!hook_for_plugin) + hook_for_plugin = ptr_hook; + } else - return 1; + { + if (!hook_for_other_plugin) + hook_for_other_plugin = ptr_hook; + } } ptr_hook = next_hook; } + /* ambiguous: command found for current plugin and other one, we don't know + which one to run! */ + if (any_plugin && hook_for_plugin && hook_for_other_plugin) + rc = -2; + else + { + if (any_plugin || hook_for_plugin) + { + ptr_hook = (hook_for_plugin) ? + hook_for_plugin : hook_for_other_plugin; + + if (ptr_hook) + { + ptr_hook->running = 1; + rc = (int) (HOOK_COMMAND(ptr_hook, callback)) + (ptr_hook->callback_data, buffer, argc, argv, argv_eol); + ptr_hook->running = 0; + if (rc == WEECHAT_RC_ERROR) + rc = 0; + else + rc = 1; + } + } + } + string_free_exploded (argv); string_free_exploded (argv_eol); hook_exec_end (); - /* no hook found */ - return -1; + return rc; } /* diff --git a/src/core/wee-hook.h b/src/core/wee-hook.h index b3625a45d..7c54e4eea 100644 --- a/src/core/wee-hook.h +++ b/src/core/wee-hook.h @@ -173,8 +173,8 @@ extern struct t_hook *hook_command (struct t_weechat_plugin *plugin, char *completion, t_hook_callback_command *callback, void *callback_data); -extern int hook_command_exec (struct t_gui_buffer *buffer, char *string, - int only_builtin); +extern int hook_command_exec (struct t_gui_buffer *buffer, int any_plugin, + struct t_weechat_plugin *plugin, char *string); extern struct t_hook *hook_timer (struct t_weechat_plugin *plugin, long interval, int align_second, int max_calls, diff --git a/src/core/wee-input.c b/src/core/wee-input.c index 4f22b759e..c7b0b45c2 100644 --- a/src/core/wee-input.c +++ b/src/core/wee-input.c @@ -66,17 +66,20 @@ input_is_command (char *line) */ int -input_exec_command (struct t_gui_buffer *buffer, char *string, - int only_builtin) +input_exec_command (struct t_gui_buffer *buffer, + int any_plugin, + struct t_weechat_plugin *plugin, + char *string) { - int rc, argc; + int rc; char *command, *pos, *ptr_args; - char **argv, **argv_eol; if ((!string) || (!string[0]) || (string[0] != '/')) return 0; command = strdup (string); + if (!command) + return 0; /* look for end of command */ ptr_args = NULL; @@ -89,12 +92,7 @@ input_exec_command (struct t_gui_buffer *buffer, char *string, pos[1] = '\0'; } - rc = hook_command_exec (buffer, command, only_builtin); - /*vars_replaced = alias_replace_vars (window, ptr_args); - rc = plugin_cmd_handler_exec (window->buffer->protocol, command + 1, - (vars_replaced) ? vars_replaced : ptr_args); - if (vars_replaced) - free (vars_replaced);*/ + rc = hook_command_exec (buffer, any_plugin, plugin, command); pos = strchr (command, ' '); if (pos) @@ -115,57 +113,23 @@ input_exec_command (struct t_gui_buffer *buffer, char *string, case 1: /* command hooked, OK (executed) */ break; default: /* no command hooked */ - argv = string_explode (ptr_args, " ", 0, 0, &argc); - argv_eol = string_explode (ptr_args, " ", 1, 0, NULL); - - /* should we send unknown command to IRC server? */ - /*if (cfg_irc_send_unknown_commands) - { - if (ptr_args) - unknown_command = malloc (strlen (command + 1) + 1 + strlen (ptr_args) + 1); - else - unknown_command = malloc (strlen (command + 1) + 1); - - if (unknown_command) - { - strcpy (unknown_command, command + 1); - if (ptr_args) - { - strcat (unknown_command, " "); - strcat (unknown_command, ptr_args); - } - irc_send_cmd_quote (server, channel, unknown_command); - free (unknown_command); - } - } - else - { - gui_chat_printf_error (NULL, - _("Error: unknown command \"%s\" (type /help for help). " - "To send unknown commands to IRC server, enable option " - "irc_send_unknown_commands."), - command + 1); - }*/ - gui_chat_printf (NULL, _("%sError: unknown command \"%s\" (type /help " "for help)"), gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], command + 1); - - string_free_exploded (argv); - string_free_exploded (argv_eol); + break; } free (command); return 0; } /* - * input_data: read user input and send data to protocol + * input_data: read user input and send data to buffer callback */ void -input_data (struct t_gui_buffer *buffer, char *data, int only_builtin) +input_data (struct t_gui_buffer *buffer, char *data) { char *new_data, *ptr_data, *pos; @@ -199,15 +163,14 @@ input_data (struct t_gui_buffer *buffer, char *data, int only_builtin) if (input_is_command (ptr_data)) { /* WeeChat or plugin command */ - (void) input_exec_command (buffer, ptr_data, - only_builtin); + (void) input_exec_command (buffer, 1, buffer->plugin, ptr_data); } else { if ((ptr_data[0] == '/') && (ptr_data[1] == '/')) ptr_data++; - - hook_command_exec (buffer, ptr_data, 0); + + hook_command_exec (buffer, 1, buffer->plugin, ptr_data); if (buffer->input_callback) { diff --git a/src/core/wee-input.h b/src/core/wee-input.h index 6bd887cf4..52420b9cd 100644 --- a/src/core/wee-input.h +++ b/src/core/wee-input.h @@ -21,8 +21,12 @@ #define __WEECHAT_INPUT_H 1 struct t_gui_buffer; +struct t_weechat_plugin; -extern void input_data (struct t_gui_buffer *buffer, char *data, - int only_builtin); +extern int input_exec_command (struct t_gui_buffer *buffer, + int any_plugin, + struct t_weechat_plugin *plugin, + char *string); +extern void input_data (struct t_gui_buffer *buffer, char *data); #endif /* wee-input.h */ diff --git a/src/gui/gui-action.c b/src/gui/gui-action.c index b4eb9ff89..f2190bdc5 100644 --- a/src/gui/gui-action.c +++ b/src/gui/gui-action.c @@ -128,7 +128,7 @@ gui_action_return (char *args) gui_current_window->buffer->ptr_history = NULL; gui_input_optimize_size (gui_current_window->buffer); gui_input_draw (gui_current_window->buffer, 0); - input_data (gui_current_window->buffer, command, 0); + input_data (gui_current_window->buffer, command); free (command); } } diff --git a/src/gui/gui-completion.c b/src/gui/gui-completion.c index 00290b7c6..eed13390a 100644 --- a/src/gui/gui-completion.c +++ b/src/gui/gui-completion.c @@ -581,6 +581,57 @@ gui_completion_list_add_plugin (struct t_gui_completion *completion) } /* + * gui_completion_list_add_plugin_commands: add plugin commands to completion + * list (plugin name is previous + * argument) + */ + +void +gui_completion_list_add_plugin_commands (struct t_gui_completion *completion) +{ + char *pos_space, *plugin_name; + struct t_weechat_plugin *ptr_plugin; + struct t_hook *ptr_hook; + + if (completion->args) + { + pos_space = strchr (completion->args, ' '); + if (pos_space) + plugin_name = string_strndup (completion->args, + pos_space - completion->args); + else + plugin_name = strdup (completion->args); + + if (plugin_name) + { + ptr_plugin = NULL; + if (string_strcasecmp (plugin_name, "weechat") != 0) + { + /* plugin name is different from "weechat", then search it in + plugin list */ + ptr_plugin = plugin_search (plugin_name); + if (!ptr_plugin) + return; + } + for (ptr_hook = weechat_hooks[HOOK_TYPE_COMMAND]; ptr_hook; + ptr_hook = ptr_hook->next_hook) + { + if (!ptr_hook->deleted + && (ptr_hook->plugin == ptr_plugin) + && HOOK_COMMAND(ptr_hook, command) + && HOOK_COMMAND(ptr_hook, command)[0]) + { + gui_completion_list_add (completion, + HOOK_COMMAND(ptr_hook, command), + 0, WEECHAT_LIST_POS_SORT); + } + } + free (plugin_name); + } + } +} + +/* * gui_completion_list_add_option_value: add option value to completion list */ @@ -817,6 +868,9 @@ gui_completion_build_list_template (struct t_gui_completion *completion, case 'p': /* plugin name */ gui_completion_list_add_plugin (completion); break; + case 'P': /* plugin commands */ + gui_completion_list_add_plugin_commands (completion); + break; case 'r': /* bar names */ gui_completion_list_add_bars_names (completion); break; diff --git a/src/gui/gui-keyboard.c b/src/gui/gui-keyboard.c index a10a11416..12a33c33f 100644 --- a/src/gui/gui-keyboard.c +++ b/src/gui/gui-keyboard.c @@ -641,7 +641,7 @@ gui_keyboard_pressed (char *key_str) for (ptr_cmd = commands; *ptr_cmd; ptr_cmd++) { input_data (gui_current_window->buffer, - *ptr_cmd, 0); + *ptr_cmd); } string_free_splitted_command (commands); } diff --git a/src/plugins/plugin-api.c b/src/plugins/plugin-api.c index 1c9cd99ce..8416d0fbb 100644 --- a/src/plugins/plugin-api.c +++ b/src/plugins/plugin-api.c @@ -357,7 +357,7 @@ plugin_api_command (struct t_weechat_plugin *plugin, command2 = string_iconv_to_internal (plugin->charset, command); if (!buffer) buffer = gui_current_window->buffer; - input_data (buffer, (command2) ? command2 : command, 0); + input_data (buffer, (command2) ? command2 : command); if (command2) free (command2); } |