irc: display a warning when the option irc.look.display_away is set to "channel"

This commit is contained in:
Sébastien Helleu 2015-05-07 07:07:09 +02:00
parent c4e260c992
commit e2310a4264
14 changed files with 138 additions and 14 deletions

View File

@ -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)

View File

@ -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"
@ -6661,6 +6661,13 @@ msgstr "čísla pro definované ignorování"
msgid "nicks in notify list"
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 /"

View File

@ -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"
@ -7643,6 +7643,13 @@ msgstr "Anzahl für festgelegte Ignorierungen"
msgid "nicks in notify list"
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 /"

View File

@ -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"
@ -6904,6 +6904,13 @@ msgstr "números para los ignores definidos"
msgid "nicks in notify list"
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 /"

View File

@ -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"
@ -7484,6 +7484,17 @@ msgstr "numéros pour les ignores définis"
msgid "nicks in notify list"
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 /"

View File

@ -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"
@ -6167,6 +6167,13 @@ msgstr ""
msgid "nicks in notify list"
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 /"

View File

@ -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"
@ -7050,6 +7050,13 @@ msgstr "numero di ignore definiti"
msgid "nicks in notify list"
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 /"

View File

@ -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"
@ -7188,6 +7188,13 @@ msgstr "無視エントリの数"
msgid "nicks in notify list"
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 /"

View File

@ -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"
@ -7294,6 +7294,13 @@ msgstr "numery zdefiniowanych ignorów"
msgid "nicks in notify list"
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 /"

View File

@ -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"
@ -6522,6 +6522,13 @@ msgstr "numéros para ignores definidos"
msgid "nicks in notify list"
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 /"

View File

@ -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"
@ -6193,6 +6193,13 @@ msgstr ""
msgid "nicks in notify list"
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 /"

View File

@ -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"
@ -5519,6 +5519,13 @@ msgstr ""
msgid "nicks in notify list"
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 /"

View File

@ -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"
@ -5454,6 +5454,13 @@ msgstr ""
msgid "nicks in notify list"
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 /"

View File

@ -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;
@ -326,6 +328,31 @@ irc_config_change_look_color_nicks_in_nicklist (void *data,
irc_nick_nicklist_set_color_all ();
}
/*
* 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;
}