diff options
-rw-r--r-- | ChangeLog.asciidoc | 1 | ||||
-rw-r--r-- | doc/de/weechat_user.de.txt | 4 | ||||
-rw-r--r-- | doc/en/weechat_user.en.txt | 2 | ||||
-rw-r--r-- | doc/fr/weechat_user.fr.txt | 2 | ||||
-rw-r--r-- | doc/it/weechat_user.it.txt | 4 | ||||
-rw-r--r-- | doc/ja/weechat_user.ja.txt | 4 | ||||
-rw-r--r-- | doc/pl/weechat_user.pl.txt | 4 | ||||
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 35 |
8 files changed, 41 insertions, 15 deletions
diff --git a/ChangeLog.asciidoc b/ChangeLog.asciidoc index c3a4ec67c..09c0f5299 100644 --- a/ChangeLog.asciidoc +++ b/ChangeLog.asciidoc @@ -97,6 +97,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] * alias: change default command for alias /beep to "/print -beep" * exec: add exec plugin: new command /exec and file exec.conf * guile: fix module used after unload of a script +* irc: add alias "whois" for target buffer of messages 401/402 (closes #54) * irc: add tag with host ("host_xxx") in IRC messages displayed (task #12018) * irc: allow many fingerprints in server option ssl_fingerprint (closes #49) * irc: rename option irc.look.item_channel_modes_hide_key to diff --git a/doc/de/weechat_user.de.txt b/doc/de/weechat_user.de.txt index c6c472130..8c9478b0c 100644 --- a/doc/de/weechat_user.de.txt +++ b/doc/de/weechat_user.de.txt @@ -2480,6 +2480,10 @@ Unvollständige Liste der IRC Nachrichten bzw. Alias die angepasst werden könne | 369 | whowas | whowas (Ende) | 378 | whois | whois (Verbindung von) | 379 | whois | whois (genutzte Modi) +// TRANSLATION MISSING +| 401 | whois | no such nick/channel +// TRANSLATION MISSING +| 402 | whois | no such server | 432 | | fehlerhafter Nickname | 433 | | Nickname wird schon verwendet | 438 | | nicht autorisiert um Nicknamen zu ändern diff --git a/doc/en/weechat_user.en.txt b/doc/en/weechat_user.en.txt index edad06aa5..83694c36c 100644 --- a/doc/en/weechat_user.en.txt +++ b/doc/en/weechat_user.en.txt @@ -2429,6 +2429,8 @@ Non-comprehensive list of IRC messages or alias that you can customize: | 369 | whowas | whowas (end) | 378 | whois | whois (connecting from) | 379 | whois | whois (using modes) +| 401 | whois | no such nick/channel +| 402 | whois | no such server | 432 | | erroneous nickname | 433 | | nickname already in use | 438 | | not authorized to change nickname diff --git a/doc/fr/weechat_user.fr.txt b/doc/fr/weechat_user.fr.txt index 934ae6f14..acb08fe6f 100644 --- a/doc/fr/weechat_user.fr.txt +++ b/doc/fr/weechat_user.fr.txt @@ -2509,6 +2509,8 @@ Liste non exhaustive des messages ou alias que vous pouvez paramétrer : | 369 | whowas | whowas (fin) | 378 | whois | whois (connexion depuis) | 379 | whois | whois (utilise les modes) +| 401 | whois | pas de tel pseudo/canal +| 402 | whois | pas de tel serveur | 432 | | pseudo erroné | 433 | | pseudo déjà en cours d'utilisation | 438 | | pas autorisé à changer de pseudo diff --git a/doc/it/weechat_user.it.txt b/doc/it/weechat_user.it.txt index 45461707c..1f9e3f687 100644 --- a/doc/it/weechat_user.it.txt +++ b/doc/it/weechat_user.it.txt @@ -2536,6 +2536,10 @@ personalizzare: | 369 | whowas | whowas (fine) | 378 | whois | whois (connesso da) | 379 | whois | whois (usa le modalità) +// TRANSLATION MISSING +| 401 | whois | no such nick/channel +// TRANSLATION MISSING +| 402 | whois | no such server | 432 | | nick errato | 433 | | nick già utilizzato | 438 | | non autorizzato a cambiare nick diff --git a/doc/ja/weechat_user.ja.txt b/doc/ja/weechat_user.ja.txt index 567551d39..c7c8ab98e 100644 --- a/doc/ja/weechat_user.ja.txt +++ b/doc/ja/weechat_user.ja.txt @@ -2428,6 +2428,10 @@ weechat:: | 369 | whowas | whowas (終了) | 378 | whois | whois (接続元) | 379 | whois | whois (モード) +// TRANSLATION MISSING +| 401 | whois | no such nick/channel +// TRANSLATION MISSING +| 402 | whois | no such server | 432 | | erroneous ニックネーム | 433 | | ニックネームが使用されています | 438 | | ニックネームを変更する権限がありません diff --git a/doc/pl/weechat_user.pl.txt b/doc/pl/weechat_user.pl.txt index 1cff272c5..d95e2f2ad 100644 --- a/doc/pl/weechat_user.pl.txt +++ b/doc/pl/weechat_user.pl.txt @@ -2453,6 +2453,10 @@ Niepełna lista wiadomości IRC lub aliasów jakie można dostosować: | 369 | whowas | whowas (koniec) | 378 | whois | whois (łączy się z) | 379 | whois | whois (używa trybów) +// TRANSLATION MISSING +| 401 | whois | no such nick/channel +// TRANSLATION MISSING +| 402 | whois | no such server | 432 | | błędna nazwa użytkownika | 433 | | nazwa użytkownika już zajęta | 438 | | brak uprawnień do zmiany nicka diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 274c7805d..f4243c39a 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -508,21 +508,26 @@ IRC_PROTOCOL_CALLBACK(generic_error) ptr_buffer = (ptr_channel) ? ptr_channel->buffer : server->buffer; - weechat_printf_date_tags (irc_msgbuffer_get_target_buffer (server, NULL, - command, NULL, - ptr_buffer), - date, - irc_protocol_tags (command, NULL, NULL, NULL), - "%s%s%s%s%s%s", - weechat_prefix ("network"), - (ptr_channel && chan_nick - && (irc_server_strcasecmp (server, chan_nick, - ptr_channel->name) == 0)) ? - IRC_COLOR_CHAT_CHANNEL : "", - (chan_nick) ? chan_nick : "", - IRC_COLOR_RESET, - (chan_nick) ? ": " : "", - args); + weechat_printf_date_tags ( + irc_msgbuffer_get_target_buffer ( + server, + NULL, + command, + ((strcmp (command, "401") == 0) || (strcmp (command, "402") == 0)) ? + "whois" : NULL, + ptr_buffer), + date, + irc_protocol_tags (command, NULL, NULL, NULL), + "%s%s%s%s%s%s", + weechat_prefix ("network"), + (ptr_channel && chan_nick + && (irc_server_strcasecmp (server, chan_nick, + ptr_channel->name) == 0)) ? + IRC_COLOR_CHAT_CHANNEL : "", + (chan_nick) ? chan_nick : "", + IRC_COLOR_RESET, + (chan_nick) ? ": " : "", + args); return WEECHAT_RC_OK; } |