diff options
-rw-r--r-- | doc/en/autogen/user/irc_options.txt | 6 | ||||
-rw-r--r-- | doc/fr/autogen/user/irc_options.txt | 6 | ||||
-rw-r--r-- | po/cs.po | 6 | ||||
-rw-r--r-- | po/de.po | 6 | ||||
-rw-r--r-- | po/es.po | 6 | ||||
-rw-r--r-- | po/fr.po | 11 | ||||
-rw-r--r-- | po/hu.po | 6 | ||||
-rw-r--r-- | po/pl.po | 5 | ||||
-rw-r--r-- | po/ru.po | 6 | ||||
-rw-r--r-- | po/weechat.pot | 5 | ||||
-rw-r--r-- | src/plugins/irc/irc-config.c | 7 | ||||
-rw-r--r-- | src/plugins/irc/irc-config.h | 7 | ||||
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 13 |
13 files changed, 59 insertions, 31 deletions
diff --git a/doc/en/autogen/user/irc_options.txt b/doc/en/autogen/user/irc_options.txt index 204dc31e3..1b919c5c8 100644 --- a/doc/en/autogen/user/irc_options.txt +++ b/doc/en/autogen/user/irc_options.txt @@ -79,9 +79,9 @@ ** values: any string (default value: "") * *irc.look.notice_as_pv* -** description: display notices as private messages -** type: boolean -** values: on, off (default value: off) +** description: display notices as private messages (if auto, use private buffer if found) +** type: integer +** values: auto, never, always (default value: auto) * *irc.look.open_near_server* ** description: open new channels/privates near server diff --git a/doc/fr/autogen/user/irc_options.txt b/doc/fr/autogen/user/irc_options.txt index 1bb551f9c..01623ec81 100644 --- a/doc/fr/autogen/user/irc_options.txt +++ b/doc/fr/autogen/user/irc_options.txt @@ -79,9 +79,9 @@ ** valeurs: toute chaîne (valeur par défaut: "") * *irc.look.notice_as_pv* -** description: afficher les notices comme des messages privés -** type: booléen -** valeurs: on, off (valeur par défaut: off) +** description: afficher les notices comme des messages privés (si auto, utilise le tampon privé s'il est trouvé) +** type: entier +** valeurs: auto, never, always (valeur par défaut: auto) * *irc.look.open_near_server* ** description: ouvrir les nouveaux canaux/privés près du serveur @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-06-14 14:06+0200\n" +"POT-Creation-Date: 2009-06-14 18:45+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3821,7 +3821,9 @@ msgstr "" msgid "delay for filtering join/part/quit messages (in minutes)" msgstr "" -msgid "display notices as private messages" +#, fuzzy +msgid "" +"display notices as private messages (if auto, use private buffer if found)" msgstr "zobrazit upozornění jako soukromé zprávy" msgid "strip colors in topic (used only when displaying buffer title)" @@ -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: 2009-06-14 14:06+0200\n" +"POT-Creation-Date: 2009-06-14 18:45+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Thomas Schuetz <i18n@internet-villa.de>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3799,7 +3799,9 @@ msgstr "" msgid "delay for filtering join/part/quit messages (in minutes)" msgstr "" -msgid "display notices as private messages" +#, fuzzy +msgid "" +"display notices as private messages (if auto, use private buffer if found)" msgstr "NOTICEs als Queries anzeigen" msgid "strip colors in topic (used only when displaying buffer title)" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-06-14 14:06+0200\n" +"POT-Creation-Date: 2009-06-14 18:45+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3785,7 +3785,9 @@ msgstr "" msgid "delay for filtering join/part/quit messages (in minutes)" msgstr "" -msgid "display notices as private messages" +#, fuzzy +msgid "" +"display notices as private messages (if auto, use private buffer if found)" msgstr "mostrar noticias como mensajes privados" msgid "strip colors in topic (used only when displaying buffer title)" @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-06-14 14:06+0200\n" -"PO-Revision-Date: 2009-06-14 14:07+0200\n" +"POT-Creation-Date: 2009-06-14 18:45+0200\n" +"PO-Revision-Date: 2009-06-14 18:45+0200\n" "Last-Translator: FlashCode <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "MIME-Version: 1.0\n" @@ -3970,8 +3970,11 @@ msgstr "" msgid "delay for filtering join/part/quit messages (in minutes)" msgstr "délai pour filtrer les messages join/part/quit (en minutes)" -msgid "display notices as private messages" -msgstr "afficher les notices comme des messages privés" +msgid "" +"display notices as private messages (if auto, use private buffer if found)" +msgstr "" +"afficher les notices comme des messages privés (si auto, utilise le tampon " +"privé s'il est trouvé)" msgid "strip colors in topic (used only when displaying buffer title)" msgstr "" @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-06-14 14:06+0200\n" +"POT-Creation-Date: 2009-06-14 18:45+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3834,7 +3834,9 @@ msgstr "" msgid "delay for filtering join/part/quit messages (in minutes)" msgstr "" -msgid "display notices as private messages" +#, fuzzy +msgid "" +"display notices as private messages (if auto, use private buffer if found)" msgstr "figyelmeztetések privát üzenetként való mutatása" msgid "strip colors in topic (used only when displaying buffer title)" @@ -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: 2009-06-14 14:06+0200\n" +"POT-Creation-Date: 2009-06-14 18:45+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: <soltys@szluug.org>\n" "Language-Team: Polish\n" @@ -3295,7 +3295,8 @@ msgstr "" msgid "delay for filtering join/part/quit messages (in minutes)" msgstr "" -msgid "display notices as private messages" +msgid "" +"display notices as private messages (if auto, use private buffer if found)" msgstr "" msgid "strip colors in topic (used only when displaying buffer title)" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-06-14 14:06+0200\n" +"POT-Creation-Date: 2009-06-14 18:45+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3826,7 +3826,9 @@ msgstr "" msgid "delay for filtering join/part/quit messages (in minutes)" msgstr "" -msgid "display notices as private messages" +#, fuzzy +msgid "" +"display notices as private messages (if auto, use private buffer if found)" msgstr "отображать notice'ы в виде личных сообщений" msgid "strip colors in topic (used only when displaying buffer title)" diff --git a/po/weechat.pot b/po/weechat.pot index 7d279ba3a..34045e363 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: 2009-06-14 14:06+0200\n" +"POT-Creation-Date: 2009-06-14 18:45+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" @@ -3262,7 +3262,8 @@ msgstr "" msgid "delay for filtering join/part/quit messages (in minutes)" msgstr "" -msgid "display notices as private messages" +msgid "" +"display notices as private messages (if auto, use private buffer if found)" msgstr "" msgid "strip colors in topic (used only when displaying buffer title)" diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index 8c2b5d841..c39ef127b 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -1188,9 +1188,10 @@ irc_config_init () NULL, 1, 60*24*7, "5", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); irc_config_look_notice_as_pv = weechat_config_new_option ( irc_config_file, ptr_section, - "notice_as_pv", "boolean", - N_("display notices as private messages"), - NULL, 0, 0, "off", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); + "notice_as_pv", "integer", + N_("display notices as private messages (if auto, use private buffer " + "if found)"), + "auto|never|always", 0, 0, "auto", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); irc_config_look_topic_strip_colors = weechat_config_new_option ( irc_config_file, ptr_section, "topic_strip_colors", "boolean", diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h index da48b66d0..efd135a16 100644 --- a/src/plugins/irc/irc-config.h +++ b/src/plugins/irc/irc-config.h @@ -35,6 +35,13 @@ enum t_irc_config_look_item_display_server IRC_CONFIG_LOOK_ITEM_DISPLAY_SERVER_NAME, }; +enum t_irc_config_look_notice_as_pv +{ + IRC_CONFIG_LOOK_NOTICE_AS_PV_AUTO = 0, + IRC_CONFIG_LOOK_NOTICE_AS_PV_NEVER, + IRC_CONFIG_LOOK_NOTICE_AS_PV_ALWAYS, +}; + enum t_irc_config_nick_completion { IRC_CONFIG_NICK_COMPLETION_SMART_OFF = 0, diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index c235223ad..b6d8e2737 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -856,10 +856,12 @@ irc_protocol_cmd_notice (struct t_irc_server *server, const char *command, notify_private = 1; } - if (nick && weechat_config_boolean (irc_config_look_notice_as_pv)) + ptr_channel = NULL; + if (nick && weechat_config_integer (irc_config_look_notice_as_pv) != IRC_CONFIG_LOOK_NOTICE_AS_PV_NEVER) { ptr_channel = irc_channel_search (server, nick); - if (!ptr_channel) + if (!ptr_channel + && weechat_config_integer (irc_config_look_notice_as_pv) == IRC_CONFIG_LOOK_NOTICE_AS_PV_ALWAYS) { ptr_channel = irc_channel_new (server, IRC_CHANNEL_TYPE_PRIVATE, @@ -871,15 +873,18 @@ irc_protocol_cmd_notice (struct t_irc_server *server, const char *command, "private buffer \"%s\""), weechat_prefix ("error"), IRC_PLUGIN_NAME, nick); - return WEECHAT_RC_ERROR; } } + } + + if (ptr_channel) + { if (!ptr_channel->topic) irc_channel_set_topic (ptr_channel, address); weechat_printf_tags (ptr_channel->buffer, irc_protocol_tags (command, - (notify_private) ? "notify_private" : NULL), + "notify_private"), "%s%s", irc_nick_as_prefix (NULL, nick, IRC_COLOR_CHAT_NICK_OTHER), |