1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-09 01:45:43 +02:00

Add tag "nick_xxx" in IRC messages

This commit is contained in:
Sebastien Helleu
2010-10-10 17:39:15 +02:00
parent 4171da77ef
commit 8d6c5e9e4c
20 changed files with 214 additions and 167 deletions
+3 -1
View File
@@ -147,7 +147,9 @@
Tags most commonly used:
no_filter, no_highlight, no_log, log0..log9 (log level),
notify_message, notify_private, notify_highlight,
irc_xxx (xxx is command name or number, see /server raw), irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, away_info.
nick_xxx (xxx is nick in message),
irc_xxx (xxx is command name or number, see /server raw),
irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, away_info.
Examples:
use IRC smart filter for join/part/quit messages:
+3 -1
View File
@@ -147,7 +147,9 @@
Tags most commonly used:
no_filter, no_highlight, no_log, log0..log9 (log level),
notify_message, notify_private, notify_highlight,
irc_xxx (xxx is command name or number, see /server raw), irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, away_info.
nick_xxx (xxx is nick in message),
irc_xxx (xxx is command name or number, see /server raw),
irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, away_info.
Examples:
use IRC smart filter for join/part/quit messages:
+3 -1
View File
@@ -147,7 +147,9 @@
Les tags les plus couramment utilisés:
no_filter, no_highlight, no_log, log0..log9 (niveau de log),
notify_message, notify_private, notify_highlight,
irc_xxx (xxx est un nom de commande ou nombre, voir /server raw), irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, away_info.
nick_xxx (xxx est le pseudo dans le message),
irc_xxx (xxx est un nom de commande ou nombre, voir /server raw),
irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, away_info.
Exemples:
utiliser le filtre intelligent IRC pour les messages join/part/quit:
+3 -1
View File
@@ -147,7 +147,9 @@
Tags most commonly used:
no_filter, no_highlight, no_log, log0..log9 (log level),
notify_message, notify_private, notify_highlight,
irc_xxx (xxx is command name or number, see /server raw), irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, away_info.
nick_xxx (xxx is nick in message),
irc_xxx (xxx is command name or number, see /server raw),
irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, away_info.
Examples:
use IRC smart filter for join/part/quit messages:
+5 -4
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-10-09 10:26+0200\n"
"POT-Creation-Date: 2010-10-10 17:17+0200\n"
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1074,9 +1074,10 @@ msgid ""
"Tags most commonly used:\n"
" no_filter, no_highlight, no_log, log0..log9 (log level),\n"
" notify_message, notify_private, notify_highlight,\n"
" irc_xxx (xxx is command name or number, see /server raw), irc_numeric, "
"irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, "
"away_info.\n"
" nick_xxx (xxx is nick in message),\n"
" irc_xxx (xxx is command name or number, see /server raw),\n"
" irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, "
"irc_smart_filter, away_info.\n"
"\n"
"Examples:\n"
" use IRC smart filter for join/part/quit messages:\n"
+5 -4
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-10-09 10:26+0200\n"
"POT-Creation-Date: 2010-10-10 17:17+0200\n"
"PO-Revision-Date: 2010-09-28 09:34+0200\n"
"Last-Translator: Nils G.\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1093,9 +1093,10 @@ msgid ""
"Tags most commonly used:\n"
" no_filter, no_highlight, no_log, log0..log9 (log level),\n"
" notify_message, notify_private, notify_highlight,\n"
" irc_xxx (xxx is command name or number, see /server raw), irc_numeric, "
"irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, "
"away_info.\n"
" nick_xxx (xxx is nick in message),\n"
" irc_xxx (xxx is command name or number, see /server raw),\n"
" irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, "
"irc_smart_filter, away_info.\n"
"\n"
"Examples:\n"
" use IRC smart filter for join/part/quit messages:\n"
+5 -4
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-10-09 10:26+0200\n"
"POT-Creation-Date: 2010-10-10 17:17+0200\n"
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1080,9 +1080,10 @@ msgid ""
"Tags most commonly used:\n"
" no_filter, no_highlight, no_log, log0..log9 (log level),\n"
" notify_message, notify_private, notify_highlight,\n"
" irc_xxx (xxx is command name or number, see /server raw), irc_numeric, "
"irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, "
"away_info.\n"
" nick_xxx (xxx is nick in message),\n"
" irc_xxx (xxx is command name or number, see /server raw),\n"
" irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, "
"irc_smart_filter, away_info.\n"
"\n"
"Examples:\n"
" use IRC smart filter for join/part/quit messages:\n"
+9 -7
View File
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-10-10 11:56+0200\n"
"PO-Revision-Date: 2010-10-10 12:22+0200\n"
"POT-Creation-Date: 2010-10-10 17:17+0200\n"
"PO-Revision-Date: 2010-10-10 17:17+0200\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: French\n"
@@ -1081,9 +1081,10 @@ msgid ""
"Tags most commonly used:\n"
" no_filter, no_highlight, no_log, log0..log9 (log level),\n"
" notify_message, notify_private, notify_highlight,\n"
" irc_xxx (xxx is command name or number, see /server raw), irc_numeric, "
"irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, "
"away_info.\n"
" nick_xxx (xxx is nick in message),\n"
" irc_xxx (xxx is command name or number, see /server raw),\n"
" irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, "
"irc_smart_filter, away_info.\n"
"\n"
"Examples:\n"
" use IRC smart filter for join/part/quit messages:\n"
@@ -1126,8 +1127,9 @@ msgstr ""
"Les tags les plus couramment utilisés:\n"
" no_filter, no_highlight, no_log, log0..log9 (niveau de log),\n"
" notify_message, notify_private, notify_highlight,\n"
" irc_xxx (xxx est un nom de commande ou nombre, voir /server raw), "
"irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, "
" nick_xxx (xxx est le pseudo dans le message),\n"
" irc_xxx (xxx est un nom de commande ou nombre, voir /server raw),\n"
" irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, "
"irc_smart_filter, away_info.\n"
"\n"
"Exemples:\n"
+5 -4
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-10-09 10:26+0200\n"
"POT-Creation-Date: 2010-10-10 17:17+0200\n"
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1047,9 +1047,10 @@ msgid ""
"Tags most commonly used:\n"
" no_filter, no_highlight, no_log, log0..log9 (log level),\n"
" notify_message, notify_private, notify_highlight,\n"
" irc_xxx (xxx is command name or number, see /server raw), irc_numeric, "
"irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, "
"away_info.\n"
" nick_xxx (xxx is nick in message),\n"
" irc_xxx (xxx is command name or number, see /server raw),\n"
" irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, "
"irc_smart_filter, away_info.\n"
"\n"
"Examples:\n"
" use IRC smart filter for join/part/quit messages:\n"
+5 -4
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-10-09 10:26+0200\n"
"POT-Creation-Date: 2010-10-10 17:17+0200\n"
"PO-Revision-Date: 2010-09-22 15:27+0200\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1070,9 +1070,10 @@ msgid ""
"Tags most commonly used:\n"
" no_filter, no_highlight, no_log, log0..log9 (log level),\n"
" notify_message, notify_private, notify_highlight,\n"
" irc_xxx (xxx is command name or number, see /server raw), irc_numeric, "
"irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, "
"away_info.\n"
" nick_xxx (xxx is nick in message),\n"
" irc_xxx (xxx is command name or number, see /server raw),\n"
" irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, "
"irc_smart_filter, away_info.\n"
"\n"
"Examples:\n"
" use IRC smart filter for join/part/quit messages:\n"
+5 -4
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-10-09 10:26+0200\n"
"POT-Creation-Date: 2010-10-10 17:17+0200\n"
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
"Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1086,9 +1086,10 @@ msgid ""
"Tags most commonly used:\n"
" no_filter, no_highlight, no_log, log0..log9 (log level),\n"
" notify_message, notify_private, notify_highlight,\n"
" irc_xxx (xxx is command name or number, see /server raw), irc_numeric, "
"irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, "
"away_info.\n"
" nick_xxx (xxx is nick in message),\n"
" irc_xxx (xxx is command name or number, see /server raw),\n"
" irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, "
"irc_smart_filter, away_info.\n"
"\n"
"Examples:\n"
" use IRC smart filter for join/part/quit messages:\n"
+5 -4
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-10-09 10:26+0200\n"
"POT-Creation-Date: 2010-10-10 17:17+0200\n"
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1055,9 +1055,10 @@ msgid ""
"Tags most commonly used:\n"
" no_filter, no_highlight, no_log, log0..log9 (log level),\n"
" notify_message, notify_private, notify_highlight,\n"
" irc_xxx (xxx is command name or number, see /server raw), irc_numeric, "
"irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, "
"away_info.\n"
" nick_xxx (xxx is nick in message),\n"
" irc_xxx (xxx is command name or number, see /server raw),\n"
" irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, "
"irc_smart_filter, away_info.\n"
"\n"
"Examples:\n"
" use IRC smart filter for join/part/quit messages:\n"
+5 -4
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: 2010-10-09 10:26+0200\n"
"POT-Creation-Date: 2010-10-10 17:17+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"
@@ -905,9 +905,10 @@ msgid ""
"Tags most commonly used:\n"
" no_filter, no_highlight, no_log, log0..log9 (log level),\n"
" notify_message, notify_private, notify_highlight,\n"
" irc_xxx (xxx is command name or number, see /server raw), irc_numeric, "
"irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, "
"away_info.\n"
" nick_xxx (xxx is nick in message),\n"
" irc_xxx (xxx is command name or number, see /server raw),\n"
" irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, "
"irc_smart_filter, away_info.\n"
"\n"
"Examples:\n"
" use IRC smart filter for join/part/quit messages:\n"
+3 -2
View File
@@ -4628,8 +4628,9 @@ command_init ()
"Tags most commonly used:\n"
" no_filter, no_highlight, no_log, log0..log9 (log level),\n"
" notify_message, notify_private, notify_highlight,\n"
" irc_xxx (xxx is command name or number, see /server "
"raw), irc_numeric, irc_error, irc_action, irc_ctcp, "
" nick_xxx (xxx is nick in message),\n"
" irc_xxx (xxx is command name or number, see /server raw),\n"
" irc_numeric, irc_error, irc_action, irc_ctcp, "
"irc_ctcp_reply, irc_smart_filter, away_info.\n\n"
"Examples:\n"
" use IRC smart filter for join/part/quit messages:\n"
+3 -1
View File
@@ -351,7 +351,9 @@ irc_command_me_channel (struct t_irc_server *server,
irc_color_decode (arguments,
weechat_config_boolean (irc_config_network_colors_receive)) : NULL;
weechat_printf_tags (channel->buffer,
irc_protocol_tags ("privmsg", "irc_action,no_highlight"),
irc_protocol_tags ("privmsg",
"irc_action,no_highlight",
server->nick),
"%s%s%s %s%s",
weechat_prefix ("action"),
IRC_COLOR_CHAT_NICK_SELF,
+17 -8
View File
@@ -121,7 +121,7 @@ irc_ctcp_display_request (struct t_irc_server *server,
return;
weechat_printf_tags ((channel) ? channel->buffer : server->buffer,
irc_protocol_tags (command, "irc_ctcp"),
irc_protocol_tags (command, "irc_ctcp", NULL),
_("%sCTCP requested by %s%s%s: %s%s%s%s%s%s"),
weechat_prefix ("network"),
IRC_COLOR_CHAT_NICK,
@@ -180,7 +180,9 @@ irc_ctcp_display_reply_from_nick (struct t_irc_server *server,
((sec1 * 1000000) + usec1);
weechat_printf_tags (server->buffer,
irc_protocol_tags (command, "irc_ctcp"),
irc_protocol_tags (command,
"irc_ctcp",
NULL),
_("%sCTCP reply from %s%s%s: %s%s%s "
"%ld.%ld %s"),
weechat_prefix ("network"),
@@ -201,7 +203,9 @@ irc_ctcp_display_reply_from_nick (struct t_irc_server *server,
else
{
weechat_printf_tags (server->buffer,
irc_protocol_tags (command, "irc_ctcp"),
irc_protocol_tags (command,
"irc_ctcp",
NULL),
_("%sCTCP reply from %s%s%s: %s%s%s%s%s"),
weechat_prefix ("network"),
IRC_COLOR_CHAT_NICK,
@@ -218,7 +222,7 @@ irc_ctcp_display_reply_from_nick (struct t_irc_server *server,
else
{
weechat_printf_tags (server->buffer,
irc_protocol_tags (command, NULL),
irc_protocol_tags (command, NULL, NULL),
_("%sCTCP reply from %s%s%s: %s%s%s%s%s"),
weechat_prefix ("network"),
IRC_COLOR_CHAT_NICK,
@@ -259,7 +263,8 @@ irc_ctcp_reply_to_nick (struct t_irc_server *server,
{
weechat_printf_tags ((channel) ? channel->buffer : server->buffer,
irc_protocol_tags (command,
"irc_ctcp,irc_ctcp_reply,no_highlight"),
"irc_ctcp,irc_ctcp_reply,no_highlight",
NULL),
_("%sCTCP reply to %s%s%s: %s%s%s%s%s"),
weechat_prefix ("network"),
IRC_COLOR_CHAT_NICK,
@@ -898,7 +903,8 @@ irc_ctcp_recv (struct t_irc_server *server, const char *command,
weechat_printf_tags (channel->buffer,
irc_protocol_tags (command,
"irc_action,notify_message"),
"irc_action,notify_message",
nick),
"%s%s%s%s%s%s",
weechat_prefix ("action"),
(ptr_nick) ? ptr_nick->color : IRC_COLOR_CHAT_NICK,
@@ -934,7 +940,8 @@ irc_ctcp_recv (struct t_irc_server *server, const char *command,
irc_protocol_tags (command,
(nick_is_me) ?
"irc_action,notify_private,no_highlight" :
"irc_action,notify_private"),
"irc_action,notify_private",
nick),
"%s%s%s%s%s%s",
weechat_prefix ("action"),
(nick_is_me) ?
@@ -991,7 +998,9 @@ irc_ctcp_recv (struct t_irc_server *server, const char *command,
if (weechat_config_boolean (irc_config_look_display_ctcp_unknown))
{
weechat_printf_tags ((channel) ? channel->buffer : server->buffer,
irc_protocol_tags (command, "irc_ctcp"),
irc_protocol_tags (command,
"irc_ctcp",
NULL),
_("%sUnknown CTCP requested by %s%s%s: "
"%s%s%s%s%s"),
weechat_prefix ("network"),
+3 -1
View File
@@ -59,7 +59,9 @@ irc_input_user_message_display (struct t_gui_buffer *buffer, const char *text)
ptr_nick = NULL;
weechat_printf_tags (buffer,
irc_protocol_tags ("privmsg", "no_highlight"),
irc_protocol_tags ("privmsg",
"no_highlight",
(ptr_nick) ? ptr_nick->name : ptr_server->nick),
"%s%s",
irc_nick_as_prefix (ptr_server,
(ptr_nick) ? ptr_nick : NULL,
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -78,7 +78,8 @@ struct t_irc_protocol_msg
};
extern const char *irc_protocol_get_nick_from_host (const char *host);
extern const char *irc_protocol_tags (const char *command, const char *tags);
extern const char *irc_protocol_tags (const char *command, const char *tags,
const char *nick);
extern void irc_protocol_recv_command (struct t_irc_server *server,
const char *irc_message,
const char *msg_command,
+9 -2
View File
@@ -100,6 +100,7 @@ xfer_chat_recv_cb (void *arg_xfer, int fd)
static char buffer[4096 + 2];
char *buf2, *pos, *ptr_buf, *ptr_buf2, *next_ptr_buf;
char *ptr_buf_decoded, *ptr_buf_without_weechat_colors, *ptr_buf_color;
char str_tags[256];
int num_read, length, ctcp_action;
/* make C compiler happy */
@@ -175,8 +176,11 @@ xfer_chat_recv_cb (void *arg_xfer, int fd)
ptr_buf_without_weechat_colors : ((ptr_buf_decoded) ? ptr_buf_decoded : ptr_buf));
if (ctcp_action)
{
snprintf (str_tags, sizeof (str_tags),
"irc_privmsg,irc_action,notify_message,nick_%s",
xfer->remote_nick);
weechat_printf_tags (xfer->buffer,
"irc_privmsg,irc_action,notify_message",
str_tags,
"%s%s%s%s%s%s",
weechat_prefix ("action"),
(xfer->remote_nick_color) ?
@@ -188,8 +192,11 @@ xfer_chat_recv_cb (void *arg_xfer, int fd)
}
else
{
snprintf (str_tags, sizeof (str_tags),
"irc_privmsg,notify_message,nick_%s",
xfer->remote_nick);
weechat_printf_tags (xfer->buffer,
"irc_privmsg,notify_message",
str_tags,
"%s%s\t%s",
(xfer->remote_nick_color) ?
xfer->remote_nick_color : weechat_color ("chat_nick_other"),