1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 13:56:37 +02:00

irc: check notify immediately when adding a nick to notify list, improve first notify message for a nick (bug #35731)

This commit is contained in:
Sebastien Helleu
2012-03-12 08:01:40 +01:00
parent 595293defc
commit d1c59c7536
15 changed files with 255 additions and 22 deletions
+3 -1
View File
@@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
v0.3.8-dev, 2012-03-10
v0.3.8-dev, 2012-03-12
Version 0.3.8 (under dev!)
@@ -13,6 +13,8 @@ Version 0.3.8 (under dev!)
(task #11316)
* core: fix display of wide chars on last column of chat area (patch #7733)
* api: add list "gui_buffer_last_displayed" in hdata "buffer"
* irc: check notify immediately when adding a nick to notify list, improve
first notify message for a nick (bug #35731)
* irc: fix display of color in hostname (join/part/quit messages)
* irc: compute hash to find nick color for nick in server message when nick
is not in nicklist
+18 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.8-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2012-03-09 10:32+0100\n"
"POT-Creation-Date: 2012-03-12 07:47+0100\n"
"PO-Revision-Date: 2012-02-26 09:16+0100\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6058,6 +6058,11 @@ msgstr "%s%s: nejste připojen k serveru"
msgid "%s%s: this buffer is not a channel!"
msgstr "%s%s: tenhle buffer není kanál!"
#. TRANSLATORS: "unknown" is the status for /notify when ison answer has not been received (check pending)
#, fuzzy
msgid "unknown"
msgstr "(neznámý)"
msgid "offline"
msgstr "offline"
@@ -6077,10 +6082,22 @@ msgstr "Seznam notifikací pro všechny servery:"
msgid "Notify list is empty on all servers"
msgstr "Seznam notifikací na všech serverech je prázdný"
#. TRANSLATORS: final "%s%s" is the server name
#, fuzzy, c-format
msgid "%snotify: %s%s%s is connected on %s%s"
msgstr "%snotifikace: %s%s%s se připojil %s%s"
#. TRANSLATORS: final "%s%s" is the server name
#, fuzzy, c-format
msgid "%snotify: %s%s%s is offline on %s%s"
msgstr "%snotifikace: %s%s%s se připojil %s%s"
#. TRANSLATORS: final "%s%s" is the server name
#, c-format
msgid "%snotify: %s%s%s has joined %s%s"
msgstr "%snotifikace: %s%s%s se připojil %s%s"
#. TRANSLATORS: final "%s%s" is the server name
#, c-format
msgid "%snotify: %s%s%s has quit %s%s"
msgstr "%snotifikace: %s%s%s odešel %s%s"
+18 -1
View File
@@ -23,7 +23,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.8-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2012-03-09 10:32+0100\n"
"POT-Creation-Date: 2012-03-12 07:47+0100\n"
"PO-Revision-Date: 2012-02-26 09:16+0100\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <weechatter@arcor.de>\n"
@@ -6511,6 +6511,11 @@ msgstr "%s%s: Es besteht keine Verbindung zum Server"
msgid "%s%s: this buffer is not a channel!"
msgstr "%s%s: Dieser Buffer ist kein Channel!"
#. TRANSLATORS: "unknown" is the status for /notify when ison answer has not been received (check pending)
#, fuzzy
msgid "unknown"
msgstr "(unbekannt)"
msgid "offline"
msgstr "Offline"
@@ -6530,10 +6535,22 @@ msgstr "Benachrichtigungen für alle Server:"
msgid "Notify list is empty on all servers"
msgstr "Es existiert keine Benachrichtigung für Server"
#. TRANSLATORS: final "%s%s" is the server name
#, fuzzy, c-format
msgid "%snotify: %s%s%s is connected on %s%s"
msgstr "%snotify: %s%s%s hat sich am Server %s%s angemeldet"
#. TRANSLATORS: final "%s%s" is the server name
#, fuzzy, c-format
msgid "%snotify: %s%s%s is offline on %s%s"
msgstr "%snotify: %s%s%s hat sich am Server %s%s angemeldet"
#. TRANSLATORS: final "%s%s" is the server name
#, c-format
msgid "%snotify: %s%s%s has joined %s%s"
msgstr "%snotify: %s%s%s hat sich am Server %s%s angemeldet"
#. TRANSLATORS: final "%s%s" is the server name
#, c-format
msgid "%snotify: %s%s%s has quit %s%s"
msgstr "%snotify: %s%s%s hat sich vom Server %s%s abgemeldet"
+18 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.8-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2012-03-09 10:32+0100\n"
"POT-Creation-Date: 2012-03-12 07:47+0100\n"
"PO-Revision-Date: 2012-02-26 09:16+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6297,6 +6297,11 @@ msgstr "%s%s: no estas conectado a ningún servidor"
msgid "%s%s: this buffer is not a channel!"
msgstr "%s%s: ¡este buffer no es un canal!"
#. TRANSLATORS: "unknown" is the status for /notify when ison answer has not been received (check pending)
#, fuzzy
msgid "unknown"
msgstr "(desconocido)"
msgid "offline"
msgstr "fuera de línea"
@@ -6316,10 +6321,22 @@ msgstr "Lista de notificaciones para todos los servidores:"
msgid "Notify list is empty on all servers"
msgstr "Lista de notificaciones vacía en todos los servidores"
#. TRANSLATORS: final "%s%s" is the server name
#, fuzzy, c-format
msgid "%snotify: %s%s%s is connected on %s%s"
msgstr "%saviso: %s%s%s se ha unido a %s%s"
#. TRANSLATORS: final "%s%s" is the server name
#, fuzzy, c-format
msgid "%snotify: %s%s%s is offline on %s%s"
msgstr "%saviso: %s%s%s se ha unido a %s%s"
#. TRANSLATORS: final "%s%s" is the server name
#, c-format
msgid "%snotify: %s%s%s has joined %s%s"
msgstr "%saviso: %s%s%s se ha unido a %s%s"
#. TRANSLATORS: final "%s%s" is the server name
#, c-format
msgid "%snotify: %s%s%s has quit %s%s"
msgstr "%saviso: %s%s%s ha salido de %s%s"
+18 -2
View File
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.8-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2012-03-09 10:32+0100\n"
"PO-Revision-Date: 2012-03-09 10:33+0100\n"
"POT-Creation-Date: 2012-03-12 07:47+0100\n"
"PO-Revision-Date: 2012-03-11 13:40+0100\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: French\n"
@@ -6360,6 +6360,10 @@ msgstr "%s%s: vous n'êtes pas connecté au serveur"
msgid "%s%s: this buffer is not a channel!"
msgstr "%s%s: ce tampon n'est pas un canal !"
#. TRANSLATORS: "unknown" is the status for /notify when ison answer has not been received (check pending)
msgid "unknown"
msgstr "inconnu"
msgid "offline"
msgstr "déconnecté"
@@ -6379,10 +6383,22 @@ msgstr "Liste de notifications pour tous les serveurs:"
msgid "Notify list is empty on all servers"
msgstr "La liste de notifications est vide sur tous les serveurs"
#. TRANSLATORS: final "%s%s" is the server name
#, c-format
msgid "%snotify: %s%s%s is connected on %s%s"
msgstr "%snotify: %s%s%s est connecté sur %s%s"
#. TRANSLATORS: final "%s%s" is the server name
#, c-format
msgid "%snotify: %s%s%s is offline on %s%s"
msgstr "%snotify: %s%s%s est déconnecté de %s%s"
#. TRANSLATORS: final "%s%s" is the server name
#, c-format
msgid "%snotify: %s%s%s has joined %s%s"
msgstr "%snotify: %s%s%s a rejoint %s%s"
#. TRANSLATORS: final "%s%s" is the server name
#, c-format
msgid "%snotify: %s%s%s has quit %s%s"
msgstr "%snotify: %s%s%s a quitté %s%s"
+18 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.8-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2012-03-09 10:32+0100\n"
"POT-Creation-Date: 2012-03-12 07:47+0100\n"
"PO-Revision-Date: 2012-02-26 09:16+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5638,6 +5638,11 @@ msgstr "%s nincs csatlakozva szerverhez!\n"
msgid "%s%s: this buffer is not a channel!"
msgstr "Ez az ablak nem egy szoba!\n"
#. TRANSLATORS: "unknown" is the status for /notify when ison answer has not been received (check pending)
#, fuzzy
msgid "unknown"
msgstr "(ismeretlen)"
msgid "offline"
msgstr ""
@@ -5658,10 +5663,22 @@ msgstr "hotlist törlése"
msgid "Notify list is empty on all servers"
msgstr ""
#. TRANSLATORS: final "%s%s" is the server name
#, fuzzy, c-format
msgid "%snotify: %s%s%s is connected on %s%s"
msgstr "%s%s%s kirúgta %s%s%s-t a(z) %s%s szobából"
#. TRANSLATORS: final "%s%s" is the server name
#, fuzzy, c-format
msgid "%snotify: %s%s%s is offline on %s%s"
msgstr "%s%s%s kirúgta %s%s%s-t a(z) %s%s szobából"
#. TRANSLATORS: final "%s%s" is the server name
#, fuzzy, c-format
msgid "%snotify: %s%s%s has joined %s%s"
msgstr "%s%s%s kirúgta %s%s%s-t a(z) %s%s szobából"
#. TRANSLATORS: final "%s%s" is the server name
#, fuzzy, c-format
msgid "%snotify: %s%s%s has quit %s%s"
msgstr "%s%s%s kirúgta %s%s%s-t a(z) %s%s szobából"
+18 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.8-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2012-03-09 10:32+0100\n"
"POT-Creation-Date: 2012-03-12 07:47+0100\n"
"PO-Revision-Date: 2012-02-26 09:16+0100\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6292,6 +6292,11 @@ msgstr "%s%s: non connesso al server"
msgid "%s%s: this buffer is not a channel!"
msgstr "%s%s: questo buffer non è un canale!"
#. TRANSLATORS: "unknown" is the status for /notify when ison answer has not been received (check pending)
#, fuzzy
msgid "unknown"
msgstr "(sconosciuto)"
msgid "offline"
msgstr "non in linea"
@@ -6311,10 +6316,22 @@ msgstr "La lista notifiche per tutti i server:"
msgid "Notify list is empty on all servers"
msgstr "La lista notifiche è vuota su tutti i server"
#. TRANSLATORS: final "%s%s" is the server name
#, fuzzy, c-format
msgid "%snotify: %s%s%s is connected on %s%s"
msgstr "%snotifica: %s%s%s è entrato in %s%s"
#. TRANSLATORS: final "%s%s" is the server name
#, fuzzy, c-format
msgid "%snotify: %s%s%s is offline on %s%s"
msgstr "%snotifica: %s%s%s è entrato in %s%s"
#. TRANSLATORS: final "%s%s" is the server name
#, c-format
msgid "%snotify: %s%s%s has joined %s%s"
msgstr "%snotifica: %s%s%s è entrato in %s%s"
#. TRANSLATORS: final "%s%s" is the server name
#, c-format
msgid "%snotify: %s%s%s has quit %s%s"
msgstr "%snotifica: %s%s%s è uscito da %s%s"
+18 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.8-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2012-03-09 10:32+0100\n"
"POT-Creation-Date: 2012-03-12 07:47+0100\n"
"PO-Revision-Date: 2012-02-26 09:16+0100\n"
"Last-Translator: \"AYANOKOUZI, Ryuunosuke\" <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese\n"
@@ -6127,6 +6127,11 @@ msgstr "%s%s: サーバに接続していません"
msgid "%s%s: this buffer is not a channel!"
msgstr "%s%s: このバッファはチャンネルではありません"
#. TRANSLATORS: "unknown" is the status for /notify when ison answer has not been received (check pending)
#, fuzzy
msgid "unknown"
msgstr "(未定義)"
msgid "offline"
msgstr "オフライン"
@@ -6146,10 +6151,22 @@ msgstr "全てのサーバの通知リスト:"
msgid "Notify list is empty on all servers"
msgstr "全てのサーバの通知リストは空です"
#. TRANSLATORS: final "%s%s" is the server name
#, fuzzy, c-format
msgid "%snotify: %s%s%s is connected on %s%s"
msgstr "%s通知: %s%s%s が %s%s に参加"
#. TRANSLATORS: final "%s%s" is the server name
#, fuzzy, c-format
msgid "%snotify: %s%s%s is offline on %s%s"
msgstr "%s通知: %s%s%s が %s%s に参加"
#. TRANSLATORS: final "%s%s" is the server name
#, c-format
msgid "%snotify: %s%s%s has joined %s%s"
msgstr "%s通知: %s%s%s が %s%s に参加"
#. TRANSLATORS: final "%s%s" is the server name
#, c-format
msgid "%snotify: %s%s%s has quit %s%s"
msgstr "%s通知: %s%s%s が %s%s から終了"
+18 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.8-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2012-03-09 10:32+0100\n"
"POT-Creation-Date: 2012-03-12 07:47+0100\n"
"PO-Revision-Date: 2012-02-26 09:16+0100\n"
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6257,6 +6257,11 @@ msgstr "%s%s: nie jesteś połączony z serwerem"
msgid "%s%s: this buffer is not a channel!"
msgstr "%s%s: to nie jest bufor kanału"
#. TRANSLATORS: "unknown" is the status for /notify when ison answer has not been received (check pending)
#, fuzzy
msgid "unknown"
msgstr "(nieznane)"
msgid "offline"
msgstr "offline"
@@ -6276,10 +6281,22 @@ msgstr "Lista powiadomień dla wszystkich serwerów"
msgid "Notify list is empty on all servers"
msgstr "Lista powiadomień jest pusta na wszystkich serwerach"
#. TRANSLATORS: final "%s%s" is the server name
#, fuzzy, c-format
msgid "%snotify: %s%s%s is connected on %s%s"
msgstr "%spowiadomienie: %s%s%s wszedł na %s%s"
#. TRANSLATORS: final "%s%s" is the server name
#, fuzzy, c-format
msgid "%snotify: %s%s%s is offline on %s%s"
msgstr "%spowiadomienie: %s%s%s wszedł na %s%s"
#. TRANSLATORS: final "%s%s" is the server name
#, c-format
msgid "%snotify: %s%s%s has joined %s%s"
msgstr "%spowiadomienie: %s%s%s wszedł na %s%s"
#. TRANSLATORS: final "%s%s" is the server name
#, c-format
msgid "%snotify: %s%s%s has quit %s%s"
msgstr "%spowiadomienie: %s%s%s wyszedł %s%s"
+18 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.8-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2012-03-09 10:32+0100\n"
"POT-Creation-Date: 2012-03-12 07:47+0100\n"
"PO-Revision-Date: 2012-02-26 09:16+0100\n"
"Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5775,6 +5775,11 @@ msgstr "%s%s: você não está conectado ao servidor"
msgid "%s%s: this buffer is not a channel!"
msgstr "%s%s: este buffer não é um canal!"
#. TRANSLATORS: "unknown" is the status for /notify when ison answer has not been received (check pending)
#, fuzzy
msgid "unknown"
msgstr "(desconhecido)"
msgid "offline"
msgstr ""
@@ -5794,10 +5799,22 @@ msgstr "Lista de notificação para todos os servidores:"
msgid "Notify list is empty on all servers"
msgstr "Lista de notificação está vazia em todos os servidores"
#. TRANSLATORS: final "%s%s" is the server name
#, fuzzy, c-format
msgid "%snotify: %s%s%s is connected on %s%s"
msgstr "%snotificação: %s%s%s entrou %s%s"
#. TRANSLATORS: final "%s%s" is the server name
#, fuzzy, c-format
msgid "%snotify: %s%s%s is offline on %s%s"
msgstr "%snotificação: %s%s%s entrou %s%s"
#. TRANSLATORS: final "%s%s" is the server name
#, c-format
msgid "%snotify: %s%s%s has joined %s%s"
msgstr "%snotificação: %s%s%s entrou %s%s"
#. TRANSLATORS: final "%s%s" is the server name
#, c-format
msgid "%snotify: %s%s%s has quit %s%s"
msgstr "%snotificação: %s%s%s saiu %s%s"
+18 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.8-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2012-03-09 10:32+0100\n"
"POT-Creation-Date: 2012-03-12 07:47+0100\n"
"PO-Revision-Date: 2012-02-26 09:16+0100\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5663,6 +5663,11 @@ msgstr "%s вы не подключены к серверу\n"
msgid "%s%s: this buffer is not a channel!"
msgstr "Это окно не является каналом!\n"
#. TRANSLATORS: "unknown" is the status for /notify when ison answer has not been received (check pending)
#, fuzzy
msgid "unknown"
msgstr "(неизвестен)"
msgid "offline"
msgstr ""
@@ -5683,10 +5688,22 @@ msgstr "очистить хотлист"
msgid "Notify list is empty on all servers"
msgstr ""
#. TRANSLATORS: final "%s%s" is the server name
#, fuzzy, c-format
msgid "%snotify: %s%s%s is connected on %s%s"
msgstr "%s%s%s выкинул %s%s%s с канала %s%s"
#. TRANSLATORS: final "%s%s" is the server name
#, fuzzy, c-format
msgid "%snotify: %s%s%s is offline on %s%s"
msgstr "%s%s%s выкинул %s%s%s с канала %s%s"
#. TRANSLATORS: final "%s%s" is the server name
#, fuzzy, c-format
msgid "%snotify: %s%s%s has joined %s%s"
msgstr "%s%s%s выкинул %s%s%s с канала %s%s"
#. TRANSLATORS: final "%s%s" is the server name
#, fuzzy, c-format
msgid "%snotify: %s%s%s has quit %s%s"
msgstr "%s%s%s выкинул %s%s%s с канала %s%s"
+17 -1
View File
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2012-03-09 10:32+0100\n"
"POT-Creation-Date: 2012-03-12 07:47+0100\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"
@@ -4875,6 +4875,10 @@ msgstr ""
msgid "%s%s: this buffer is not a channel!"
msgstr ""
#. TRANSLATORS: "unknown" is the status for /notify when ison answer has not been received (check pending)
msgid "unknown"
msgstr ""
msgid "offline"
msgstr ""
@@ -4894,10 +4898,22 @@ msgstr ""
msgid "Notify list is empty on all servers"
msgstr ""
#. TRANSLATORS: final "%s%s" is the server name
#, c-format
msgid "%snotify: %s%s%s is connected on %s%s"
msgstr ""
#. TRANSLATORS: final "%s%s" is the server name
#, c-format
msgid "%snotify: %s%s%s is offline on %s%s"
msgstr ""
#. TRANSLATORS: final "%s%s" is the server name
#, c-format
msgid "%snotify: %s%s%s has joined %s%s"
msgstr ""
#. TRANSLATORS: final "%s%s" is the server name
#, c-format
msgid "%snotify: %s%s%s has quit %s%s"
msgstr ""
+1
View File
@@ -2930,6 +2930,7 @@ irc_command_notify (void *data, struct t_gui_buffer *buffer, int argc,
IRC_PLUGIN_NAME,
IRC_COLOR_CHAT_NICK,
ptr_notify->nick);
irc_notify_check_now (ptr_notify);
}
else
{
+50 -9
View File
@@ -193,7 +193,7 @@ irc_notify_new (struct t_irc_server *server, const char *nick, int check_away)
new_notify->server = server;
new_notify->nick = strdup (nick);
new_notify->check_away = check_away;
new_notify->is_on_server = 0;
new_notify->is_on_server = -1;
new_notify->away_message = NULL;
new_notify->ison_received = 0;
@@ -210,6 +210,35 @@ irc_notify_new (struct t_irc_server *server, const char *nick, int check_away)
return new_notify;
}
/*
* irc_notify_check_now: check now ison/whois for a notify (called when a
* notify is added)
*/
void
irc_notify_check_now (struct t_irc_notify *notify)
{
if (notify->server->is_connected)
{
/* send the ISON for nick */
irc_redirect_new (notify->server, "ison", "notify", 1,
NULL, 0, NULL);
irc_server_sendf (notify->server,
IRC_SERVER_SEND_OUTQ_PRIO_LOW, NULL,
"ISON :%s", notify->nick);
if (notify->check_away)
{
/* send the WHOIS for nick */
irc_redirect_new (notify->server, "whois", "notify", 1,
notify->nick, 0, "301,401");
irc_server_sendf (notify->server,
IRC_SERVER_SEND_OUTQ_PRIO_LOW, NULL,
"WHOIS :%s", notify->nick);
}
}
}
/*
* irc_notify_new_for_server: create notify list for server with option
* "irc.server.xxx.notify"
@@ -332,7 +361,8 @@ irc_notify_free_all (struct t_irc_server *server)
void
irc_notify_display (struct t_gui_buffer *buffer, struct t_irc_notify *notify)
{
if (!notify->is_on_server && !notify->away_message)
if ((notify->is_on_server < 0)
|| (!notify->is_on_server && !notify->away_message))
{
weechat_printf (buffer,
" %s%s%s @ %s%s%s: %s%s",
@@ -342,7 +372,10 @@ irc_notify_display (struct t_gui_buffer *buffer, struct t_irc_notify *notify)
IRC_COLOR_CHAT_SERVER,
notify->server->name,
IRC_COLOR_RESET,
IRC_COLOR_MESSAGE_QUIT,
(notify->is_on_server < 0) ? "" : IRC_COLOR_MESSAGE_QUIT,
(notify->is_on_server < 0) ?
/* TRANSLATORS: "unknown" is the status for /notify when ison answer has not been received (check pending) */
_("unknown") :
_("offline"));
}
else
@@ -462,20 +495,28 @@ irc_notify_set_is_on_server (struct t_irc_notify *notify,
if (notify->is_on_server == is_on_server)
return;
notify->is_on_server = is_on_server;
weechat_printf_tags (notify->server->buffer,
irc_notify_get_tags (irc_config_look_notify_tags_ison),
(notify->is_on_server) ?
_("%snotify: %s%s%s has joined %s%s") :
_("%snotify: %s%s%s has quit %s%s"),
(notify->is_on_server < 0) ?
((is_on_server) ?
/* TRANSLATORS: final "%s%s" is the server name */
_("%snotify: %s%s%s is connected on %s%s") :
/* TRANSLATORS: final "%s%s" is the server name */
_("%snotify: %s%s%s is offline on %s%s")) :
((is_on_server) ?
/* TRANSLATORS: final "%s%s" is the server name */
_("%snotify: %s%s%s has joined %s%s") :
/* TRANSLATORS: final "%s%s" is the server name */
_("%snotify: %s%s%s has quit %s%s")),
weechat_prefix ("network"),
IRC_COLOR_CHAT_NICK,
notify->nick,
(notify->is_on_server) ?
(is_on_server) ?
IRC_COLOR_MESSAGE_JOIN : IRC_COLOR_MESSAGE_QUIT,
IRC_COLOR_CHAT_SERVER,
notify->server->name);
notify->is_on_server = is_on_server;
}
/*
+4
View File
@@ -29,6 +29,9 @@ struct t_irc_notify
int check_away; /* check away status (with whois) */
/* current state of nick */
int is_on_server; /* 1 if nick is currently on server */
/* 0 if nick is not on server */
/* -1 for unknown status (check is */
/* in progress) */
/* (using answer of ison command) */
char *away_message; /* current away message, NULL if */
/* nick is not away (using answer of */
@@ -47,6 +50,7 @@ extern void irc_notify_set_server_option (struct t_irc_server *server);
extern struct t_irc_notify *irc_notify_new (struct t_irc_server *server,
const char *nick,
int check_away);
extern void irc_notify_check_now (struct t_irc_notify *notify);
extern void irc_notify_new_for_server (struct t_irc_server *server);
extern void irc_notify_new_for_all_servers ();
extern void irc_notify_free (struct t_irc_server *server,