diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2015-05-07 07:07:09 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2015-05-07 07:07:09 +0200 |
commit | e2310a426441583aca650ee26d2854a4b413832b (patch) | |
tree | 1ce074d4f92c513e8ed30604e7b0b15b43c684e3 | |
parent | c4e260c9926ad4df12ec9503556499ffc371e895 (diff) | |
download | weechat-e2310a426441583aca650ee26d2854a4b413832b.zip |
irc: display a warning when the option irc.look.display_away is set to "channel"
-rw-r--r-- | ChangeLog.asciidoc | 2 | ||||
-rw-r--r-- | po/cs.po | 9 | ||||
-rw-r--r-- | po/de.po | 9 | ||||
-rw-r--r-- | po/es.po | 9 | ||||
-rw-r--r-- | po/fr.po | 15 | ||||
-rw-r--r-- | po/hu.po | 9 | ||||
-rw-r--r-- | po/it.po | 9 | ||||
-rw-r--r-- | po/ja.po | 9 | ||||
-rw-r--r-- | po/pl.po | 9 | ||||
-rw-r--r-- | po/pt_BR.po | 9 | ||||
-rw-r--r-- | po/ru.po | 9 | ||||
-rw-r--r-- | po/tr.po | 9 | ||||
-rw-r--r-- | po/weechat.pot | 9 | ||||
-rw-r--r-- | src/plugins/irc/irc-config.c | 36 |
14 files changed, 138 insertions, 14 deletions
diff --git a/ChangeLog.asciidoc b/ChangeLog.asciidoc index b7c3ca0ae..59d0b7ea9 100644 --- a/ChangeLog.asciidoc +++ b/ChangeLog.asciidoc @@ -38,6 +38,8 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] * api: add support of full color option name in functions color() and string_eval_expression() and in command /eval * api: add "_chat_line" (line pointer) in hashtable of hook_focus +* irc: display a warning when the option irc.look.display_away is set to + "channel" * irc: optimize search of a nick in nicklist (up to 3x faster) * irc: add support of SHA-256 and SHA-512 algorithms in server option "ssl_fingerprint" (closes #281) @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-26 10:44+0200\n" +"POT-Creation-Date: 2015-05-07 07:02+0200\n" "PO-Revision-Date: 2015-03-21 08:41+0100\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6663,6 +6663,13 @@ msgstr "přezdívky v seznamu notifikací" #, c-format msgid "" +"%sWARNING: the value \"channel\" for option \"irc.look.display_away\" will " +"send all your away changes to the channels, which is often considered as " +"spam; therefore you could be banned from channels, you are warned!" +msgstr "" + +#, c-format +msgid "" "%s%s: warning: proxy \"%s\" does not exist (you can create it with command /" "proxy)" msgstr "" @@ -24,7 +24,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-26 10:44+0200\n" +"POT-Creation-Date: 2015-05-07 07:02+0200\n" "PO-Revision-Date: 2015-04-26 13:08+0100\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <>\n" @@ -7645,6 +7645,13 @@ msgstr "Nicks für die eine Benachrichtigung existiert" #, c-format msgid "" +"%sWARNING: the value \"channel\" for option \"irc.look.display_away\" will " +"send all your away changes to the channels, which is often considered as " +"spam; therefore you could be banned from channels, you are warned!" +msgstr "" + +#, c-format +msgid "" "%s%s: warning: proxy \"%s\" does not exist (you can create it with command /" "proxy)" msgstr "" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-26 10:44+0200\n" +"POT-Creation-Date: 2015-05-07 07:02+0200\n" "PO-Revision-Date: 2015-03-21 08:41+0100\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6906,6 +6906,13 @@ msgstr "apodos en la lista de notificación" #, c-format msgid "" +"%sWARNING: the value \"channel\" for option \"irc.look.display_away\" will " +"send all your away changes to the channels, which is often considered as " +"spam; therefore you could be banned from channels, you are warned!" +msgstr "" + +#, c-format +msgid "" "%s%s: warning: proxy \"%s\" does not exist (you can create it with command /" "proxy)" msgstr "" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-26 10:44+0200\n" -"PO-Revision-Date: 2015-04-26 11:43+0200\n" +"POT-Creation-Date: 2015-05-07 07:02+0200\n" +"PO-Revision-Date: 2015-05-07 07:03+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -7486,6 +7486,17 @@ msgstr "pseudos dans la liste de notifications" #, c-format msgid "" +"%sWARNING: the value \"channel\" for option \"irc.look.display_away\" will " +"send all your away changes to the channels, which is often considered as " +"spam; therefore you could be banned from channels, you are warned!" +msgstr "" +"%sATTENTION : la valeur \"channel\" pour l'option \"irc.look.display_away\" " +"enverra tous vos statuts d'absence aux canaux, ce qui est souvent considéré " +"comme du spam ; par conséquent vous pourriez être bannis de canaux, vous " +"êtes prévenus !" + +#, c-format +msgid "" "%s%s: warning: proxy \"%s\" does not exist (you can create it with command /" "proxy)" msgstr "" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-26 10:44+0200\n" +"POT-Creation-Date: 2015-05-07 07:02+0200\n" "PO-Revision-Date: 2015-03-21 08:41+0100\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6169,6 +6169,13 @@ msgstr "%s nem található ilyen mellőzés\n" #, c-format msgid "" +"%sWARNING: the value \"channel\" for option \"irc.look.display_away\" will " +"send all your away changes to the channels, which is often considered as " +"spam; therefore you could be banned from channels, you are warned!" +msgstr "" + +#, c-format +msgid "" "%s%s: warning: proxy \"%s\" does not exist (you can create it with command /" "proxy)" msgstr "" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-26 10:44+0200\n" +"POT-Creation-Date: 2015-05-07 07:02+0200\n" "PO-Revision-Date: 2015-03-21 08:41+0100\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7052,6 +7052,13 @@ msgstr "nick nella lista notifiche" #, c-format msgid "" +"%sWARNING: the value \"channel\" for option \"irc.look.display_away\" will " +"send all your away changes to the channels, which is often considered as " +"spam; therefore you could be banned from channels, you are warned!" +msgstr "" + +#, c-format +msgid "" "%s%s: warning: proxy \"%s\" does not exist (you can create it with command /" "proxy)" msgstr "" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-26 10:44+0200\n" +"POT-Creation-Date: 2015-05-07 07:02+0200\n" "PO-Revision-Date: 2015-04-29 02:38+0900\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/weechat/tree/translation_ja>\n" @@ -7190,6 +7190,13 @@ msgstr "通知エントリのニックネーム" #, c-format msgid "" +"%sWARNING: the value \"channel\" for option \"irc.look.display_away\" will " +"send all your away changes to the channels, which is often considered as " +"spam; therefore you could be banned from channels, you are warned!" +msgstr "" + +#, c-format +msgid "" "%s%s: warning: proxy \"%s\" does not exist (you can create it with command /" "proxy)" msgstr "" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-26 10:44+0200\n" +"POT-Creation-Date: 2015-05-07 07:02+0200\n" "PO-Revision-Date: 2015-03-21 08:41+0100\n" "Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7296,6 +7296,13 @@ msgstr "nicki na liście powiadomień" #, c-format msgid "" +"%sWARNING: the value \"channel\" for option \"irc.look.display_away\" will " +"send all your away changes to the channels, which is often considered as " +"spam; therefore you could be banned from channels, you are warned!" +msgstr "" + +#, c-format +msgid "" "%s%s: warning: proxy \"%s\" does not exist (you can create it with command /" "proxy)" msgstr "" diff --git a/po/pt_BR.po b/po/pt_BR.po index ee72fc177..5a6aa2883 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-26 10:44+0200\n" +"POT-Creation-Date: 2015-05-07 07:02+0200\n" "PO-Revision-Date: 2015-03-21 08:41+0100\n" "Last-Translator: Eduardo Elias <camponez@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6524,6 +6524,13 @@ msgstr "apelidos na lista de notificação" #, c-format msgid "" +"%sWARNING: the value \"channel\" for option \"irc.look.display_away\" will " +"send all your away changes to the channels, which is often considered as " +"spam; therefore you could be banned from channels, you are warned!" +msgstr "" + +#, c-format +msgid "" "%s%s: warning: proxy \"%s\" does not exist (you can create it with command /" "proxy)" msgstr "" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-26 10:44+0200\n" +"POT-Creation-Date: 2015-05-07 07:02+0200\n" "PO-Revision-Date: 2015-03-21 08:41+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6195,6 +6195,13 @@ msgstr "%s игнорирования не найдены\n" #, c-format msgid "" +"%sWARNING: the value \"channel\" for option \"irc.look.display_away\" will " +"send all your away changes to the channels, which is often considered as " +"spam; therefore you could be banned from channels, you are warned!" +msgstr "" + +#, c-format +msgid "" "%s%s: warning: proxy \"%s\" does not exist (you can create it with command /" "proxy)" msgstr "" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-26 10:44+0200\n" +"POT-Creation-Date: 2015-05-07 07:02+0200\n" "PO-Revision-Date: 2015-03-10 21:33+0100\n" "Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -5521,6 +5521,13 @@ msgstr "" #, c-format msgid "" +"%sWARNING: the value \"channel\" for option \"irc.look.display_away\" will " +"send all your away changes to the channels, which is often considered as " +"spam; therefore you could be banned from channels, you are warned!" +msgstr "" + +#, c-format +msgid "" "%s%s: warning: proxy \"%s\" does not exist (you can create it with command /" "proxy)" msgstr "" diff --git a/po/weechat.pot b/po/weechat.pot index ff59dec24..faf4d0164 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-04-26 10:44+0200\n" +"POT-Creation-Date: 2015-05-07 07:02+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -5456,6 +5456,13 @@ msgstr "" #, c-format msgid "" +"%sWARNING: the value \"channel\" for option \"irc.look.display_away\" will " +"send all your away changes to the channels, which is often considered as " +"spam; therefore you could be banned from channels, you are warned!" +msgstr "" + +#, c-format +msgid "" "%s%s: warning: proxy \"%s\" does not exist (you can create it with command /" "proxy)" msgstr "" diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index 488c8911b..0806b2bb7 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -47,6 +47,8 @@ struct t_config_section *irc_config_section_ctcp = NULL; struct t_config_section *irc_config_section_server_default = NULL; struct t_config_section *irc_config_section_server = NULL; +int irc_config_loading = 0; + /* IRC config, look section */ struct t_config_option *irc_config_look_buffer_open_before_autojoin; @@ -327,6 +329,31 @@ irc_config_change_look_color_nicks_in_nicklist (void *data, } /* + * Callback for changes on option "irc.look.display_away". + */ + +void +irc_config_change_look_display_away (void *data, + struct t_config_option *option) +{ + /* make C compiler happy */ + (void) data; + (void) option; + + if (!irc_config_loading + && (weechat_config_integer (irc_config_look_display_away) == IRC_CONFIG_DISPLAY_AWAY_CHANNEL)) + { + weechat_printf ( + NULL, + _("%sWARNING: the value \"channel\" for option " + "\"irc.look.display_away\" will send all your away changes to " + "the channels, which is often considered as spam; therefore you " + "could be banned from channels, you are warned!"), + weechat_prefix ("error")); + } +} + +/* * Callback for changes on option "irc.look.display_join_message". */ @@ -1279,7 +1306,9 @@ irc_config_reload (void *data, struct t_config_file *config_file) irc_ignore_free_all (); + irc_config_loading = 1; rc = weechat_config_reload (config_file); + irc_config_loading = 0; ptr_server = irc_servers; while (ptr_server) @@ -2409,7 +2438,8 @@ irc_config_init () "display_away", "integer", N_("display message when (un)marking as away (off: do not display/send " "anything, local: display locally, channel: send action to channels)"), - "off|local|channel", 0, 0, "local", NULL, 0, NULL, NULL, NULL, NULL, + "off|local|channel", 0, 0, "local", NULL, 0, NULL, NULL, + &irc_config_change_look_display_away, NULL, NULL, NULL); irc_config_look_display_ctcp_blocked = weechat_config_new_option ( irc_config_file, ptr_section, @@ -3094,7 +3124,10 @@ irc_config_read () { int rc; + irc_config_loading = 1; rc = weechat_config_read (irc_config_file); + irc_config_loading = 0; + if (rc == WEECHAT_CONFIG_READ_OK) { irc_notify_new_for_all_servers (); @@ -3106,6 +3139,7 @@ irc_config_read () irc_config_change_network_notify_check_ison (NULL, NULL); irc_config_change_network_notify_check_whois (NULL, NULL); } + return rc; } |