diff --git a/ChangeLog b/ChangeLog index ceeb8cc78..70c80b3c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,13 +1,15 @@ WeeChat ChangeLog ================= FlashCode -v0.3.2-dev, 2010-02-24 +v0.3.2-dev, 2010-02-26 Version 0.3.2 (under dev!) -------------------------- * core: add signal "day_changed" * core: add new command /mute +* core: add command line option "-s" (or "--no-script") to start WeeChat + without loading any script * core: remove unneeded space after time on each line if option weechat.look.buffer_time_format is set to empty value (bug #28751) * core: add option "switch_active_buffer_previous" for command /input diff --git a/doc/weechat-curses.1 b/doc/weechat-curses.1 index f18a46d1b..14c866e00 100644 --- a/doc/weechat-curses.1 +++ b/doc/weechat-curses.1 @@ -1,4 +1,4 @@ -.TH WEECHAT 1 "January 2010" "FlashCode" +.TH WEECHAT 1 "February 2010" "FlashCode" .SH NAME weechat-curses \- Wee Enhanced Environment for Chat (Curses version) @@ -43,6 +43,10 @@ display program license .br don't load any plugin at startup .TP +.B \-s, \-\-no\-script +.br +don't load any script at startup +.TP .B \-v, \-\-version .br display WeeChat version diff --git a/po/cs.po b/po/cs.po index ad8d1e169..67a5a31eb 100644 --- a/po/cs.po +++ b/po/cs.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-02-23 10:39+0100\n" +"POT-Creation-Date: 2010-02-26 11:22+0100\n" "PO-Revision-Date: 2010-02-23 10:43+0100\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -27,6 +27,7 @@ msgstr "" msgid "Usage: %s [option...] [plugin:option...]\n" msgstr "Použití: %s [volba...] [plugin:volba...]\n" +#, fuzzy msgid "" " -a, --no-connect disable auto-connect to servers at startup\n" " -d, --dir set WeeChat home directory (default: ~/.weechat)\n" @@ -34,6 +35,7 @@ msgid "" " -k, --keys display WeeChat default keys\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" +" -s, --no-script don't load any script at startup\n" " -v, --version display WeeChat version\n" " plugin:option option for plugin\n" " for example, irc plugin can connect\n" diff --git a/po/de.po b/po/de.po index 6a7e8a7c0..49a07bd43 100644 --- a/po/de.po +++ b/po/de.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-02-23 10:39+0100\n" +"POT-Creation-Date: 2010-02-26 11:22+0100\n" "PO-Revision-Date: 2010-02-23 10:43+0100\n" "Last-Translator: Nils G \n" "Language-Team: weechat-dev \n" @@ -33,6 +33,7 @@ msgstr "" msgid "Usage: %s [option...] [plugin:option...]\n" msgstr "Aufruf: %s [Option...] [Erweiterung:Option...]\n" +#, fuzzy msgid "" " -a, --no-connect disable auto-connect to servers at startup\n" " -d, --dir set WeeChat home directory (default: ~/.weechat)\n" @@ -40,6 +41,7 @@ msgid "" " -k, --keys display WeeChat default keys\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" +" -s, --no-script don't load any script at startup\n" " -v, --version display WeeChat version\n" " plugin:option option for plugin\n" " for example, irc plugin can connect\n" diff --git a/po/es.po b/po/es.po index 5a8edb131..bf6ffc691 100644 --- a/po/es.po +++ b/po/es.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-02-23 10:39+0100\n" +"POT-Creation-Date: 2010-02-26 11:22+0100\n" "PO-Revision-Date: 2010-02-23 10:43+0100\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -29,6 +29,7 @@ msgstr "" msgid "Usage: %s [option...] [plugin:option...]\n" msgstr "Uso: %s [opción...] [plugin:opción...]\n" +#, fuzzy msgid "" " -a, --no-connect disable auto-connect to servers at startup\n" " -d, --dir set WeeChat home directory (default: ~/.weechat)\n" @@ -36,6 +37,7 @@ msgid "" " -k, --keys display WeeChat default keys\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" +" -s, --no-script don't load any script at startup\n" " -v, --version display WeeChat version\n" " plugin:option option for plugin\n" " for example, irc plugin can connect\n" diff --git a/po/fr.po b/po/fr.po index 4819fb380..36a3a436b 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-02-23 10:39+0100\n" -"PO-Revision-Date: 2010-02-23 10:43+0100\n" +"POT-Creation-Date: 2010-02-26 11:22+0100\n" +"PO-Revision-Date: 2010-02-26 11:27+0100\n" "Last-Translator: FlashCode \n" "Language-Team: weechat-dev \n" "MIME-Version: 1.0\n" @@ -34,6 +34,7 @@ msgid "" " -k, --keys display WeeChat default keys\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" +" -s, --no-script don't load any script at startup\n" " -v, --version display WeeChat version\n" " plugin:option option for plugin\n" " for example, irc plugin can connect\n" @@ -50,6 +51,7 @@ msgstr "" " -k, --keys afficher les touches WeeChat par défaut\n" " -l, --license afficher la licence WeeChat\n" " -p, --no-plugin ne charger aucune extension au démarrage\n" +" -s, --no-script ne charger aucun script au démarrage\n" " -v, --version afficher la version de WeeChat\n" " extension:option option pour une extension\n" " par exemple, l'extension irc peut se connecter\n" diff --git a/po/hu.po b/po/hu.po index 3b553bf67..77fde668a 100644 --- a/po/hu.po +++ b/po/hu.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-02-23 10:39+0100\n" +"POT-Creation-Date: 2010-02-26 11:22+0100\n" "PO-Revision-Date: 2010-02-23 10:43+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -41,6 +41,7 @@ msgid "" " -k, --keys display WeeChat default keys\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" +" -s, --no-script don't load any script at startup\n" " -v, --version display WeeChat version\n" " plugin:option option for plugin\n" " for example, irc plugin can connect\n" diff --git a/po/it.po b/po/it.po index 119ab5cad..f836b8077 100644 --- a/po/it.po +++ b/po/it.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Weechat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-02-23 10:39+0100\n" +"POT-Creation-Date: 2010-02-26 11:22+0100\n" "PO-Revision-Date: 2010-02-23 10:43+0100\n" "Last-Translator: Marco Paolone \n" "Language-Team: weechat-dev \n" @@ -29,6 +29,7 @@ msgstr "" msgid "Usage: %s [option...] [plugin:option...]\n" msgstr "Utilizzo: %s [opzione...] [plugin:opzione...]\n" +#, fuzzy msgid "" " -a, --no-connect disable auto-connect to servers at startup\n" " -d, --dir set WeeChat home directory (default: ~/.weechat)\n" @@ -36,6 +37,7 @@ msgid "" " -k, --keys display WeeChat default keys\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" +" -s, --no-script don't load any script at startup\n" " -v, --version display WeeChat version\n" " plugin:option option for plugin\n" " for example, irc plugin can connect\n" diff --git a/po/pl.po b/po/pl.po index 2b82ad391..70d701b16 100644 --- a/po/pl.po +++ b/po/pl.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-02-23 10:39+0100\n" +"POT-Creation-Date: 2010-02-26 11:22+0100\n" "PO-Revision-Date: 2010-02-23 10:43+0100\n" "Last-Translator: Krzysztof Koroscik \n" "Language-Team: Polish\n" @@ -31,6 +31,7 @@ msgstr "" msgid "Usage: %s [option...] [plugin:option...]\n" msgstr "Użycie: %s [argumenty...] [wtyczka:opcje...]\n" +#, fuzzy msgid "" " -a, --no-connect disable auto-connect to servers at startup\n" " -d, --dir set WeeChat home directory (default: ~/.weechat)\n" @@ -38,6 +39,7 @@ msgid "" " -k, --keys display WeeChat default keys\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" +" -s, --no-script don't load any script at startup\n" " -v, --version display WeeChat version\n" " plugin:option option for plugin\n" " for example, irc plugin can connect\n" diff --git a/po/ru.po b/po/ru.po index f2384c0b7..0b0ff9061 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-02-23 10:39+0100\n" +"POT-Creation-Date: 2010-02-26 11:22+0100\n" "PO-Revision-Date: 2010-02-23 10:43+0100\n" "Last-Translator: Pavel Shevchuk \n" "Language-Team: weechat-dev \n" @@ -37,6 +37,7 @@ msgid "" " -k, --keys display WeeChat default keys\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" +" -s, --no-script don't load any script at startup\n" " -v, --version display WeeChat version\n" " plugin:option option for plugin\n" " for example, irc plugin can connect\n" diff --git a/po/weechat.pot b/po/weechat.pot index 12e58e336..606f8d457 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-02-23 10:39+0100\n" +"POT-Creation-Date: 2010-02-26 11:22+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -33,6 +33,7 @@ msgid "" " -k, --keys display WeeChat default keys\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" +" -s, --no-script don't load any script at startup\n" " -v, --version display WeeChat version\n" " plugin:option option for plugin\n" " for example, irc plugin can connect\n" diff --git a/src/core/weechat.c b/src/core/weechat.c index 177b2fc42..a1f603be5 100644 --- a/src/core/weechat.c +++ b/src/core/weechat.c @@ -111,6 +111,7 @@ weechat_display_usage (char *exec_name) " -k, --keys display WeeChat default keys\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" + " -s, --no-script don't load any script at startup\n" " -v, --version display WeeChat version\n" " plugin:option option for plugin\n" " for example, irc plugin can connect\n" diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index 5cebfe8ea..38e72c022 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -586,10 +586,12 @@ plugin_load (const char *filename) argc = 0; for (i = 0; i < plugin_argc; i++) { - if ((string_strcasecmp (plugin_argv[i], "-a") == 0) - || (string_strcasecmp (plugin_argv[i], "--no-connect") == 0) - || (string_strcasecmp (plugin_argv[i], "--upgrade") == 0) - || (string_strncasecmp (plugin_argv[i], name, strlen (name)) == 0)) + if ((strcmp (plugin_argv[i], "-a") == 0) + || (strcmp (plugin_argv[i], "--no-connect") == 0) + || (strcmp (plugin_argv[i], "-s") == 0) + || (strcmp (plugin_argv[i], "--no-script") == 0) + || (strcmp (plugin_argv[i], "--upgrade") == 0) + || (strncmp (plugin_argv[i], name, strlen (name)) == 0)) { argv[argc] = plugin_argv[i]; argc++; diff --git a/src/plugins/scripts/script.c b/src/plugins/scripts/script.c index b08f4df98..20b8712fe 100644 --- a/src/plugins/scripts/script.c +++ b/src/plugins/scripts/script.c @@ -209,7 +209,7 @@ script_init (struct t_weechat_plugin *weechat_plugin, { char *string, *completion; char signal_name[128]; - int length, i, upgrading; + int length, i, upgrading, auto_load_scripts; /* read script configuration */ script_config_read (weechat_plugin); @@ -298,16 +298,29 @@ script_init (struct t_weechat_plugin *weechat_plugin, weechat_plugin->name); weechat_hook_signal (signal_name, callback_signal_script_action, NULL); - /* autoload scripts */ - script_auto_load (weechat_plugin, callback_load_file); - - /* actions after upgrade */ + /* parse arguments */ upgrading = 0; + auto_load_scripts = 1; for (i = 0; i < argc; i++) { - if (weechat_strcasecmp (argv[i], "--upgrade") == 0) + if (strcmp (argv[i], "--upgrade") == 0) + { upgrading = 1; + } + else if ((strcmp (argv[i], "-s") == 0) + || (strcmp (argv[i], "--no-script") == 0)) + { + auto_load_scripts = 0; + } } + + /* autoload scripts */ + if (auto_load_scripts) + { + script_auto_load (weechat_plugin, callback_load_file); + } + + /* set buffer callbacks after upgrade */ if (upgrading) { script_upgrade_set_buffer_callbacks (weechat_plugin,