diff --git a/ChangeLog b/ChangeLog index 15bc877bc..7f2053c8b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ WeeChat ChangeLog ================= FlashCode -v0.3.3-dev, 2010-05-23 +v0.3.3-dev, 2010-05-26 Version 0.3.3 (under dev!) @@ -9,6 +9,7 @@ Version 0.3.3 (under dev!) * core: add keys for undo/redo changes on command line (default: ctrl/alt + underscore) (task #9483) +* core: add new option weechat.look.confirm_quit * core: fix crash with hook_process (when timer is called on a deleted hook process) * api: add function "string_expand_home", fix bug with replacement of home in diff --git a/doc/en/autogen/user/weechat_commands.txt b/doc/en/autogen/user/weechat_commands.txt index 8b11f6edf..8a10f8f82 100644 --- a/doc/en/autogen/user/weechat_commands.txt +++ b/doc/en/autogen/user/weechat_commands.txt @@ -293,11 +293,12 @@ /proxy del myproxy ........................................ -• *`/quit`* `[arguments]`:: +• *`/quit`* `[-yes] [arguments]`:: ........................................ quit WeeChat + -yes: required if option weechat.look.confirm_quit is enabled arguments: text sent with signal "quit" (for example irc plugin uses this text to send quit message to server) ........................................ diff --git a/doc/en/autogen/user/weechat_options.txt b/doc/en/autogen/user/weechat_options.txt index a523dc9a9..8c80335bd 100644 --- a/doc/en/autogen/user/weechat_options.txt +++ b/doc/en/autogen/user/weechat_options.txt @@ -388,6 +388,11 @@ ** type: string ** values: any string (default value: "") +* *weechat.look.confirm_quit* +** description: if set, /quit command must be confirmed with extra argument "-yes" (see /help quit) +** type: boolean +** values: on, off (default value: off) + * *weechat.look.day_change* ** description: display special message when day changes ** type: boolean diff --git a/doc/fr/autogen/user/weechat_commands.txt b/doc/fr/autogen/user/weechat_commands.txt index baf673a80..b4d2b6e82 100644 --- a/doc/fr/autogen/user/weechat_commands.txt +++ b/doc/fr/autogen/user/weechat_commands.txt @@ -293,11 +293,12 @@ /proxy del myproxy ........................................ -• *`/quit`* `[paramètres]`:: +• *`/quit`* `[-yes] [paramètres]`:: ........................................ quitter WeeChat + -yes: requis si l'option weechat.look.confirm_quit est activée paramètres: texte envoyé avec le signal "quit" (par exemple l'extension irc utilise ce texte pour envoyer le message de quit au serveur) ........................................ diff --git a/doc/fr/autogen/user/weechat_options.txt b/doc/fr/autogen/user/weechat_options.txt index 8d2d2ee22..303554804 100644 --- a/doc/fr/autogen/user/weechat_options.txt +++ b/doc/fr/autogen/user/weechat_options.txt @@ -388,6 +388,11 @@ ** type: chaîne ** valeurs: toute chaîne (valeur par défaut: "") +* *weechat.look.confirm_quit* +** description: si activé, la commande /quit doit être confirmée par le paramètre supplémentaire "-yes" (voir /help quit) +** type: booléen +** valeurs: on, off (valeur par défaut: off) + * *weechat.look.day_change* ** description: affiche un message quand le jour change ** type: booléen diff --git a/doc/it/autogen/user/weechat_commands.txt b/doc/it/autogen/user/weechat_commands.txt index 8eabc7076..49c0f8156 100644 --- a/doc/it/autogen/user/weechat_commands.txt +++ b/doc/it/autogen/user/weechat_commands.txt @@ -293,13 +293,14 @@ /proxy del mioproxy ........................................ -• *`/quit`* `[argomenti]`:: +• *`/quit`* `[-yes] [arguments]`:: ........................................ esce da WeeChat - argomenti: testo inviato con il segnale "quit" - (ad esempio il plugin irc usa questo testo per inviare il messaggio di uscita al server) + -yes: required if option weechat.look.confirm_quit is enabled + arguments: text sent with signal "quit" + (for example irc plugin uses this text to send quit message to server) ........................................ • *`/reload`* `[file [file....]]`:: diff --git a/doc/it/autogen/user/weechat_options.txt b/doc/it/autogen/user/weechat_options.txt index 0dad30f4d..8420104ff 100644 --- a/doc/it/autogen/user/weechat_options.txt +++ b/doc/it/autogen/user/weechat_options.txt @@ -388,6 +388,11 @@ ** tipo: stringa ** valori: qualsiasi stringa (valore predefinito: "") +* *weechat.look.confirm_quit* +** descrizione: if set, /quit command must be confirmed with extra argument "-yes" (see /help quit) +** tipo: bool +** valori: on, off (valore predefinito: off) + * *weechat.look.day_change* ** descrizione: mostra un messaggio speciale al cambio di data ** tipo: bool diff --git a/po/cs.po b/po/cs.po index 21f06e0e9..1c78baf2b 100644 --- a/po/cs.po +++ b/po/cs.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.3-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-05-24 10:00+0200\n" +"POT-Creation-Date: 2010-05-26 13:16+0200\n" "PO-Revision-Date: 2010-05-20 12:20+0200\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -594,6 +594,11 @@ msgstr "Proxy byla smazána" msgid "%sError: unable to set option \"%s\" for proxy \"%s\"" msgstr "%sChyba: nemohu nastavit volbu \"%s\" pro proxy \"%s\"" +#, c-format +msgid "" +"%sYou must confirm quit command with extra argument \"-yes\" (see /help quit)" +msgstr "" + #, c-format msgid "Options reloaded from %s" msgstr "Volby načteny z %s" @@ -1352,10 +1357,13 @@ msgstr "" msgid "quit WeeChat" msgstr "ukončit WeeChat" -msgid "[arguments]" +#, fuzzy +msgid "[-yes] [arguments]" msgstr "[argumenty]" +#, fuzzy msgid "" +" -yes: required if option weechat.look.confirm_quit is enabled\n" "arguments: text sent with signal \"quit\"\n" " (for example irc plugin uses this text to send quit message to " "server)" @@ -1684,6 +1692,11 @@ msgstr "" "musí začínat jedním z těchto znaků; lomítko (\"/\") je vždy považováno za " "předponu příkazu (napříkald: \".$\")" +msgid "" +"if set, /quit command must be confirmed with extra argument \"-yes\" (see /" +"help quit)" +msgstr "" + msgid "display special message when day changes" msgstr "zobrazit speiální zprávy při změně dne" diff --git a/po/de.po b/po/de.po index c17fc0c1e..67bbd0139 100644 --- a/po/de.po +++ b/po/de.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.3-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-05-24 10:00+0200\n" +"POT-Creation-Date: 2010-05-26 13:16+0200\n" "PO-Revision-Date: 2010-05-24 10:01+0200\n" "Last-Translator: Nils G \n" "Language-Team: weechat-dev \n" @@ -606,6 +606,11 @@ msgstr "Proxy gelöscht" msgid "%sError: unable to set option \"%s\" for proxy \"%s\"" msgstr "%sFehler: Option \"%s\" kann für den Proxy \"%s\" nicht setzt werden" +#, c-format +msgid "" +"%sYou must confirm quit command with extra argument \"-yes\" (see /help quit)" +msgstr "" + #, c-format msgid "Options reloaded from %s" msgstr "Konfiguration, %s, wurde neu geladen" @@ -1389,10 +1394,13 @@ msgstr "" msgid "quit WeeChat" msgstr "WeeChat beenden" -msgid "[arguments]" +#, fuzzy +msgid "[-yes] [arguments]" msgstr "[arguments]" +#, fuzzy msgid "" +" -yes: required if option weechat.look.confirm_quit is enabled\n" "arguments: text sent with signal \"quit\"\n" " (for example irc plugin uses this text to send quit message to " "server)" @@ -1746,6 +1754,11 @@ msgstr "" "ausführen kann. Zum Beispiel mittels \".$\". Der Schrägstrich (slash: \"/\") " "ist ein reserviertes Zeichen und kann immer genutzt werden." +msgid "" +"if set, /quit command must be confirmed with extra argument \"-yes\" (see /" +"help quit)" +msgstr "" + msgid "display special message when day changes" msgstr "Wenn ein neuer Tag beginnt wird eine entsprechende Nachricht angezeigt" diff --git a/po/es.po b/po/es.po index 777914bbb..bd130d050 100644 --- a/po/es.po +++ b/po/es.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.3-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-05-24 10:00+0200\n" +"POT-Creation-Date: 2010-05-26 13:16+0200\n" "PO-Revision-Date: 2010-05-20 12:31+0200\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -593,6 +593,11 @@ msgstr "Proxy eliminado" msgid "%sError: unable to set option \"%s\" for proxy \"%s\"" msgstr "%sError: no se pudo configurar la opción \"%s\" para el proxy \"%s\"" +#, c-format +msgid "" +"%sYou must confirm quit command with extra argument \"-yes\" (see /help quit)" +msgstr "" + #, c-format msgid "Options reloaded from %s" msgstr "Opciones recargadas desde %s" @@ -1363,10 +1368,13 @@ msgstr "" msgid "quit WeeChat" msgstr "cerrar WeeChat" -msgid "[arguments]" +#, fuzzy +msgid "[-yes] [arguments]" msgstr "[argumentos]" +#, fuzzy msgid "" +" -yes: required if option weechat.look.confirm_quit is enabled\n" "arguments: text sent with signal \"quit\"\n" " (for example irc plugin uses this text to send quit message to " "server)" @@ -1702,6 +1710,11 @@ msgstr "" "no: el comando debe empezar con uno de estos caracteres; la barra (\"/\") es " "siempre considerado como prefijo de comando (ejemplo: \".$\")" +msgid "" +"if set, /quit command must be confirmed with extra argument \"-yes\" (see /" +"help quit)" +msgstr "" + msgid "display special message when day changes" msgstr "mostrar un mensaje especial cuando el día cambia" diff --git a/po/fr.po b/po/fr.po index 0d375035c..bc331a15f 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.3-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-05-24 10:00+0200\n" -"PO-Revision-Date: 2010-05-24 10:01+0200\n" +"POT-Creation-Date: 2010-05-26 13:16+0200\n" +"PO-Revision-Date: 2010-05-26 13:16+0200\n" "Last-Translator: FlashCode \n" "Language-Team: weechat-dev \n" "Language: French\n" @@ -595,6 +595,13 @@ msgstr "Proxy supprimé" msgid "%sError: unable to set option \"%s\" for proxy \"%s\"" msgstr "%sErreur: impossible de modifier l'option \"%s\" pour le proxy \"%s\"" +#, c-format +msgid "" +"%sYou must confirm quit command with extra argument \"-yes\" (see /help quit)" +msgstr "" +"%sVous devez confirmer la commande pour quitter avec le paramètre " +"supplémentaire \"-yes\" (voir /help quit)" + #, c-format msgid "Options reloaded from %s" msgstr "Options rechargées depuis %s" @@ -1364,14 +1371,16 @@ msgstr "" msgid "quit WeeChat" msgstr "quitter WeeChat" -msgid "[arguments]" -msgstr "[paramètres]" +msgid "[-yes] [arguments]" +msgstr "[-yes] [paramètres]" msgid "" +" -yes: required if option weechat.look.confirm_quit is enabled\n" "arguments: text sent with signal \"quit\"\n" " (for example irc plugin uses this text to send quit message to " "server)" msgstr "" +" -yes: requis si l'option weechat.look.confirm_quit est activée\n" "paramètres: texte envoyé avec le signal \"quit\"\n" " (par exemple l'extension irc utilise ce texte pour envoyer le " "message de quit au serveur)" @@ -1707,6 +1716,13 @@ msgstr "" "non: l'entrée doit démarrer avec un de ces caractères; le slash (\"/\") est " "toujours considéré comme un préfixe de commande (exemple: \".$\")" +msgid "" +"if set, /quit command must be confirmed with extra argument \"-yes\" (see /" +"help quit)" +msgstr "" +"si activé, la commande /quit doit être confirmée par le paramètre " +"supplémentaire \"-yes\" (voir /help quit)" + msgid "display special message when day changes" msgstr "affiche un message quand le jour change" diff --git a/po/hu.po b/po/hu.po index cba9dad28..2d1f716f1 100644 --- a/po/hu.po +++ b/po/hu.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.3-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-05-24 10:00+0200\n" +"POT-Creation-Date: 2010-05-26 13:16+0200\n" "PO-Revision-Date: 2010-05-20 12:20+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -652,6 +652,11 @@ msgstr "a felhasználók le lettek tiltva" msgid "%sError: unable to set option \"%s\" for proxy \"%s\"" msgstr "%s ismeretlen opció a \"%s\" parancsnak\n" +#, c-format +msgid "" +"%sYou must confirm quit command with extra argument \"-yes\" (see /help quit)" +msgstr "" + #, fuzzy, c-format msgid "Options reloaded from %s" msgstr "Modul beállítások elmentve\n" @@ -1237,10 +1242,11 @@ msgid "quit WeeChat" msgstr "" #, fuzzy -msgid "[arguments]" +msgid "[-yes] [arguments]" msgstr "fogadó típusa [paraméterek]" msgid "" +" -yes: required if option weechat.look.confirm_quit is enabled\n" "arguments: text sent with signal \"quit\"\n" " (for example irc plugin uses this text to send quit message to " "server)" @@ -1502,6 +1508,11 @@ msgid "" "command prefix (example: \".$\")" msgstr "" +msgid "" +"if set, /quit command must be confirmed with extra argument \"-yes\" (see /" +"help quit)" +msgstr "" + msgid "display special message when day changes" msgstr "speciális üzenet az aktuális nap megváltozásakor" diff --git a/po/it.po b/po/it.po index 75b152414..e310758a8 100644 --- a/po/it.po +++ b/po/it.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Weechat 0.3.3-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-05-24 10:00+0200\n" +"POT-Creation-Date: 2010-05-26 13:16+0200\n" "PO-Revision-Date: 2010-05-24 10:01+0200\n" "Last-Translator: Marco Paolone \n" "Language-Team: weechat-dev \n" @@ -593,6 +593,11 @@ msgstr "Proxy eliminato" msgid "%sError: unable to set option \"%s\" for proxy \"%s\"" msgstr "%sErrore: impossibile impostare l'opzione \"%s\" per il proxy \"%s\"" +#, c-format +msgid "" +"%sYou must confirm quit command with extra argument \"-yes\" (see /help quit)" +msgstr "" + #, c-format msgid "Options reloaded from %s" msgstr "Opzioni ricaricate da %s" @@ -1356,10 +1361,13 @@ msgstr "" msgid "quit WeeChat" msgstr "esce da WeeChat" -msgid "[arguments]" +#, fuzzy +msgid "[-yes] [arguments]" msgstr "[argomenti]" +#, fuzzy msgid "" +" -yes: required if option weechat.look.confirm_quit is enabled\n" "arguments: text sent with signal \"quit\"\n" " (for example irc plugin uses this text to send quit message to " "server)" @@ -1698,6 +1706,11 @@ msgstr "" "no: l'input deve iniziare con uno di questi caratteri: la barra (\"/\") è " "sempre considerata come prefisso per comando (esempio: \".$\")" +msgid "" +"if set, /quit command must be confirmed with extra argument \"-yes\" (see /" +"help quit)" +msgstr "" + msgid "display special message when day changes" msgstr "mostra un messaggio speciale al cambio di data" diff --git a/po/pl.po b/po/pl.po index 2037a7ed0..85d9d0653 100644 --- a/po/pl.po +++ b/po/pl.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.3-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-05-24 10:00+0200\n" +"POT-Creation-Date: 2010-05-26 13:16+0200\n" "PO-Revision-Date: 2010-05-20 12:22+0200\n" "Last-Translator: Krzysztof Koroscik \n" "Language-Team: weechat-dev \n" @@ -599,6 +599,11 @@ msgstr "Proxy usunięte" msgid "%sError: unable to set option \"%s\" for proxy \"%s\"" msgstr "%sBłąd: nie można ustawić opcji \"%s\" dla proxy \"%s\"" +#, c-format +msgid "" +"%sYou must confirm quit command with extra argument \"-yes\" (see /help quit)" +msgstr "" + #, c-format msgid "Options reloaded from %s" msgstr "Ustawienia przeładowane z %s" @@ -1368,10 +1373,13 @@ msgstr "" msgid "quit WeeChat" msgstr "zakończ WeeChat" -msgid "[arguments]" +#, fuzzy +msgid "[-yes] [arguments]" msgstr "[argumenty]" +#, fuzzy msgid "" +" -yes: required if option weechat.look.confirm_quit is enabled\n" "arguments: text sent with signal \"quit\"\n" " (for example irc plugin uses this text to send quit message to " "server)" @@ -1710,6 +1718,11 @@ msgstr "" "wprowadzony ciąg musi się zaczynać od jednego z tych znaków; slasz (\"/\") " "jest zawsze uważany za prefix komendy (np: \".$\")" +msgid "" +"if set, /quit command must be confirmed with extra argument \"-yes\" (see /" +"help quit)" +msgstr "" + msgid "display special message when day changes" msgstr "wyświetlaj specjalną wiadomość, kiedy zmienia się dzień" diff --git a/po/ru.po b/po/ru.po index 0a648ec59..e8b092258 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.3-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-05-24 10:00+0200\n" +"POT-Creation-Date: 2010-05-26 13:16+0200\n" "PO-Revision-Date: 2010-05-20 12:22+0200\n" "Last-Translator: Pavel Shevchuk \n" "Language-Team: weechat-dev \n" @@ -651,6 +651,11 @@ msgstr "команда users отключена" msgid "%sError: unable to set option \"%s\" for proxy \"%s\"" msgstr "%s неизвестный параметр для команды \"%s\"\n" +#, c-format +msgid "" +"%sYou must confirm quit command with extra argument \"-yes\" (see /help quit)" +msgstr "" + #, fuzzy, c-format msgid "Options reloaded from %s" msgstr "Настройки pluginов сохранены\n" @@ -1240,10 +1245,11 @@ msgid "quit WeeChat" msgstr "" #, fuzzy -msgid "[arguments]" +msgid "[-yes] [arguments]" msgstr "адресат тип [аргументы]" msgid "" +" -yes: required if option weechat.look.confirm_quit is enabled\n" "arguments: text sent with signal \"quit\"\n" " (for example irc plugin uses this text to send quit message to " "server)" @@ -1505,6 +1511,11 @@ msgid "" "command prefix (example: \".$\")" msgstr "" +msgid "" +"if set, /quit command must be confirmed with extra argument \"-yes\" (see /" +"help quit)" +msgstr "" + msgid "display special message when day changes" msgstr "отображать специальное сообщение при смене дня" diff --git a/po/weechat.pot b/po/weechat.pot index 242aa66be..42b3002f5 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: 2010-05-24 10:00+0200\n" +"POT-Creation-Date: 2010-05-26 13:16+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -569,6 +569,11 @@ msgstr "" msgid "%sError: unable to set option \"%s\" for proxy \"%s\"" msgstr "" +#, c-format +msgid "" +"%sYou must confirm quit command with extra argument \"-yes\" (see /help quit)" +msgstr "" + #, c-format msgid "Options reloaded from %s" msgstr "" @@ -1071,10 +1076,11 @@ msgstr "" msgid "quit WeeChat" msgstr "" -msgid "[arguments]" +msgid "[-yes] [arguments]" msgstr "" msgid "" +" -yes: required if option weechat.look.confirm_quit is enabled\n" "arguments: text sent with signal \"quit\"\n" " (for example irc plugin uses this text to send quit message to " "server)" @@ -1296,6 +1302,11 @@ msgid "" "command prefix (example: \".$\")" msgstr "" +msgid "" +"if set, /quit command must be confirmed with extra argument \"-yes\" (see /" +"help quit)" +msgstr "" + msgid "display special message when day changes" msgstr "" diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 84f3c5b2c..c6a6a5b61 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -3148,17 +3148,44 @@ int command_quit (void *data, struct t_gui_buffer *buffer, int argc, char **argv, char **argv_eol) { + int confirm_ok; + char *pos_args; + /* make C compiler happy */ (void) data; (void) buffer; - (void) argv; - /* send quit signal (used by plugins to disconnect from servers,..) */ - hook_signal_send ("quit", - WEECHAT_HOOK_SIGNAL_STRING, - (argc > 1) ? argv_eol[1] : NULL); + confirm_ok = 0; + pos_args = NULL; + if (argc > 1) + { + if (string_strcasecmp (argv[1], "-yes") == 0) + { + confirm_ok = 1; + if (argc > 2) + pos_args = argv_eol[2]; + } + else + pos_args = argv_eol[1]; + } - /* force end of main loop */ + /* if confirmation is required, check that "-yes" is given */ + if (CONFIG_BOOLEAN(config_look_confirm_quit) && !confirm_ok) + { + gui_chat_printf (NULL, + _("%sYou must confirm quit command with extra " + "argument \"-yes\" (see /help quit)"), + gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]); + return WEECHAT_RC_OK; + } + + /* + * send quit signal: some plugins like irc use this signal to disconnect + * from servers + */ + hook_signal_send ("quit", WEECHAT_HOOK_SIGNAL_STRING, pos_args); + + /* force end of WeeChat main loop */ weechat_quit = 1; return WEECHAT_RC_OK; @@ -4746,8 +4773,10 @@ command_init () &command_proxy, NULL); hook_command (NULL, "quit", N_("quit WeeChat"), - N_("[arguments]"), - N_("arguments: text sent with signal \"quit\"\n" + N_("[-yes] [arguments]"), + N_(" -yes: required if option weechat.look.confirm_quit " + "is enabled\n" + "arguments: text sent with signal \"quit\"\n" " (for example irc plugin uses this text to " "send quit message to server)"), "", diff --git a/src/core/wee-config.c b/src/core/wee-config.c index 29e536ff3..9170700e1 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -76,6 +76,7 @@ struct t_config_option *config_look_buffer_time_format; struct t_config_option *config_look_color_nicks_number; struct t_config_option *config_look_color_real_white; struct t_config_option *config_look_command_chars; +struct t_config_option *config_look_confirm_quit; struct t_config_option *config_look_day_change; struct t_config_option *config_look_day_change_time_format; struct t_config_option *config_look_highlight; @@ -1270,6 +1271,12 @@ config_weechat_init_options () "input must start with one of these chars; the slash (\"/\") is " "always considered as command prefix (example: \".$\")"), NULL, 0, 0, "", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); + config_look_confirm_quit = config_file_new_option ( + weechat_config_file, ptr_section, + "confirm_quit", "boolean", + N_("if set, /quit command must be confirmed with extra argument " + "\"-yes\" (see /help quit)"), + NULL, 0, 0, "off", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); config_look_day_change = config_file_new_option ( weechat_config_file, ptr_section, "day_change", "boolean", diff --git a/src/core/wee-config.h b/src/core/wee-config.h index 005935496..f034f1b78 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -87,6 +87,7 @@ extern struct t_config_option *config_startup_display_version; extern struct t_config_option *config_look_buffer_notify_default; extern struct t_config_option *config_look_buffer_time_format; extern struct t_config_option *config_look_command_chars; +extern struct t_config_option *config_look_confirm_quit; extern struct t_config_option *config_look_color_nicks_number; extern struct t_config_option *config_look_color_real_white; extern struct t_config_option *config_look_day_change;