api: remove functions printf_date() and printf_tags()

This commit is contained in:
Sébastien Helleu 2016-06-18 08:49:35 +02:00
parent b1d32b29f9
commit 20c86db0d8
22 changed files with 584 additions and 747 deletions

View File

@ -25,6 +25,7 @@ New features::
Improvements::
* core, irc, xfer: display more information in memory allocation errors (issue #573)
* api: remove functions printf_date() and printf_tags()
* relay: allow escape of comma in command "init" (weechat protocol) (issue #730)
Bug fixes::

View File

@ -17,6 +17,20 @@ https://weechat.org/files/changelog/ChangeLog-devel.html[ChangeLog]
(file _ChangeLog.adoc_ in sources).
[[v1.6]]
== Version 1.6 (under dev)
[[v1.6_api_printf]]
Some "printf" functions have been removed from C API (there were not in scripting API):
* printf_date
* printf_tags
The function "printf_date_tags" must now be used instead of these functions
(the two functions removed were just C macros on function "printf_date_tags"
with tags set to NULL for "printf_date" and date set to 0 for "printf_tags").
[[v1.5]]
== Version 1.5 (2016-05-01)

View File

@ -6889,63 +6889,6 @@ weechat.prnt(buffer, "\t\t") # empty line (without time)
[NOTE]
Function is called "print" in scripts ("prnt" in Python).
==== printf_date
Display a message on a buffer, using a custom date.
Prototype:
[source,C]
----
void weechat_printf_date (struct t_gui_buffer *buffer, time_t date,
const char *message, ...);
----
Arguments:
* _buffer_: buffer pointer, if NULL, message is displayed on WeeChat buffer
* _date_: date for message (0 means current date/time)
* _message_: message to display
C example:
[source,C]
----
weechat_printf_date (NULL, time (NULL) - 120, "Hello, 2 minutes ago");
----
[NOTE]
This function is not available in scripting API.
==== printf_tags
Display a message on a buffer, using a custom tags.
Prototype:
[source,C]
----
void weechat_printf_tags (struct t_gui_buffer *buffer, const char *tags,
const char *message, ...);
----
Arguments:
* _buffer_: buffer pointer, if NULL, message is displayed on WeeChat buffer
* _tags_: comma separated list of tags
* _message_: message to display
C example:
[source,C]
----
weechat_printf_tags (NULL, "notify_message",
"Message with a tag 'notify_message'");
----
[NOTE]
This function is not available in scripting API.
==== printf_date_tags
Display a message on a buffer, using a custom date and tags.

View File

@ -7002,65 +7002,6 @@ weechat.prnt(buffer, "\t\t") # ligne vide (sans heure)
[NOTE]
La fonction s'appelle "print" dans les scripts ("prnt" en Python).
==== printf_date
Afficher un message sur un tampon, en utilisant une date personnalisée.
Prototype :
[source,C]
----
void weechat_printf_date (struct t_gui_buffer *buffer, time_t date,
const char *message, ...);
----
Paramètres :
* _buffer_ : pointeur vers le tampon, si NULL, le message est affiché sur le
tampon Weechat
* _date_ : date pour le message (0 signifie la date/heure courante)
* _message_ : message à afficher
Exemple en C :
[source,C]
----
weechat_printf_date (NULL, time (NULL) - 120, "Bonjour, il y a 2 minutes");
----
[NOTE]
Cette fonction n'est pas disponible dans l'API script.
==== printf_tags
Afficher un message sur un tampon, avec des étiquettes personnalisées.
Prototype :
[source,C]
----
void weechat_printf_tags (struct t_gui_buffer *buffer, const char *tags,
const char *message, ...);
----
Paramètres :
* _buffer_ : pointeur vers le tampon, si NULL, le message est affiché sur le
tampon Weechat
* _tags_ : liste d'étiquettes séparées par des virgules
* _message_ : message à afficher
Exemple en C :
[source,C]
----
weechat_printf_tags (NULL, "notify_message",
"Message avec une étiquette 'notify_message'");
----
[NOTE]
Cette fonction n'est pas disponible dans l'API script.
==== printf_date_tags
Afficher un message sur un tampon, en utilisant une date et des étiquettes

View File

@ -7064,65 +7064,6 @@ weechat.prnt(buffer, "\t\t") # empty line (without time)
[NOTE]
La funzione è chiamata "print" negli script ("prnt" in Python).
==== printf_date
Visualizza un messaggio sul buffer, utilizzando una data personalizzata.
Prototipo:
[source,C]
----
void weechat_printf_date (struct t_gui_buffer *buffer, time_t date,
const char *message, ...);
----
Argomenti:
* _buffer_: puntatore al buffer, se NULL, il messaggio viene visualizzato
sul buffer di WeeChat
* _date_: data per il messaggio (0 indica data/ora corrente)
* _message_: messaggio da visualizzare
Esempio in C:
[source,C]
----
weechat_printf_date (NULL, time (NULL) - 120, "Ciao, 2 minuti fa");
----
[NOTE]
Questa funzione non è disponibile nelle API per lo scripting.
==== printf_tags
Visualizza un messaggio sul buffer, utilizzando tag personalizzati.
Prototipo:
[source,C]
----
void weechat_printf_tags (struct t_gui_buffer *buffer, const char *tags,
const char *message, ...);
----
Argomenti:
* _buffer_: puntatore al buffer, se NULL il messaggio viene visualizzato
sul buffer di WeeChat
* _tags_: lista di tag separati da virgole
* _message_: messaggio da visualizzare
Esempio in C:
[source,C]
----
weechat_printf_tags (NULL, "notify_message",
"Messaggio con tag 'notify_message'");
----
[NOTE]
Questa funzione non è disponibile nelle API per lo scripting.
==== printf_date_tags
Visualizza un messaggio sul buffer, usando tag e data personalizzati.

View File

@ -6889,63 +6889,6 @@ weechat.prnt(buffer, "\t\t") # empty line (without time)
[NOTE]
この関数をスクリプトの中で実行するには "print" (Python の場合は "prnt") と書きます。
==== printf_date
日付を指定してバッファにメッセージを表示。
プロトタイプ:
[source,C]
----
void weechat_printf_date (struct t_gui_buffer *buffer, time_t date,
const char *message, ...);
----
引数:
* _buffer_: バッファへのポインタ、NULL の場合、メッセージは WeeChat バッファに表示
* _date_: メッセージの日付 (0 は現在の日付/時間を意味する)
* _message_: 表示するメッセージ
C 言語での使用例:
[source,C]
----
weechat_printf_date (NULL, time (NULL) - 120, "Hello, 2 minutes ago");
----
[NOTE]
スクリプト API ではこの関数を利用できません。
==== printf_tags
タグを指定してバッファにメッセージを表示。
プロトタイプ:
[source,C]
----
void weechat_printf_tags (struct t_gui_buffer *buffer, const char *tags,
const char *message, ...);
----
引数:
* _buffer_: バッファへのポインタ、NULL の場合、メッセージは WeeChat バッファに表示
* _tags_: タグのコンマ区切りリスト
* _message_: 表示するメッセージ
C 言語での使用例:
[source,C]
----
weechat_printf_tags (NULL, "notify_message",
"Message with a tag 'notify_message'");
----
[NOTE]
スクリプト API ではこの関数を利用できません。
==== printf_date_tags
日付とタグを指定してバッファにメッセージを表示。

View File

@ -333,7 +333,8 @@ exec_display_line (struct t_exec_cmd *exec_cmd, struct t_gui_buffer *buffer,
{
snprintf (str_number, sizeof (str_number),
"%d\t", exec_cmd->output_line_nb);
weechat_printf_tags (buffer, str_tags,
weechat_printf_date_tags (
buffer, 0, str_tags,
"%s%s",
(exec_cmd->line_numbers) ? str_number : " \t",
line_color);
@ -477,7 +478,8 @@ exec_end_command (struct t_exec_cmd *exec_cmd, int return_code)
}
else
{
weechat_printf_tags (ptr_buffer, "exec_rc",
weechat_printf_date_tags (
ptr_buffer, 0, "exec_rc",
_("%s: end of command %d (\"%s\"), "
"return code: %d"),
EXEC_PLUGIN_NAME, exec_cmd->number,
@ -496,7 +498,8 @@ exec_end_command (struct t_exec_cmd *exec_cmd, int return_code)
}
else
{
weechat_printf_tags (ptr_buffer, "exec_rc",
weechat_printf_date_tags (
ptr_buffer, 0, "exec_rc",
_("%s: unexpected end of command %d "
"(\"%s\")"),
EXEC_PLUGIN_NAME, exec_cmd->number,

View File

@ -1337,8 +1337,9 @@ irc_channel_display_nick_back_in_pv (struct t_irc_server *server,
{
if (weechat_config_boolean (irc_config_look_display_pv_back))
{
weechat_printf_tags (
weechat_printf_date_tags (
ptr_channel->buffer,
0,
"irc_nick_back",
_("%s%s%s %s(%s%s%s)%s is back on server"),
weechat_prefix ("join"),

View File

@ -640,8 +640,9 @@ irc_command_me_channel_display (struct t_irc_server *server,
irc_color_decode (arguments,
weechat_config_boolean (irc_config_network_colors_send)) : NULL;
ptr_nick = irc_nick_search (server, channel, server->nick);
weechat_printf_tags (
weechat_printf_date_tags (
channel->buffer,
0,
irc_protocol_tags ("privmsg", "irc_action,notify_none,no_highlight",
server->nick, NULL),
"%s%s%s%s%s%s%s",
@ -726,7 +727,8 @@ irc_command_display_away (struct t_irc_server *server, const char *string1,
if ((ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL)
|| (ptr_channel->type == IRC_CHANNEL_TYPE_PRIVATE))
{
weechat_printf_tags (ptr_channel->buffer,
weechat_printf_date_tags (ptr_channel->buffer,
0,
"away_info",
"%s[%s%s%s %s: %s%s]",
IRC_COLOR_CHAT_DELIMITERS,
@ -3163,8 +3165,9 @@ IRC_COMMAND_CALLBACK(msg)
* message to channel ops/voiced
* (to "@#channel" or "+#channel")
*/
weechat_printf_tags (
weechat_printf_date_tags (
ptr_channel2->buffer,
0,
"notify_none,no_highlight",
"%s%s%s -> %s%s%s: %s",
weechat_prefix ("network"),
@ -3251,8 +3254,9 @@ IRC_COMMAND_CALLBACK(msg)
}
else
{
weechat_printf_tags (
weechat_printf_date_tags (
ptr_server->buffer,
0,
irc_protocol_tags (
"privmsg", "notify_none,no_highlight",
ptr_server->nick, NULL),
@ -3430,10 +3434,11 @@ IRC_COMMAND_CALLBACK(notice)
string = irc_color_decode (
str_args,
weechat_config_boolean (irc_config_network_colors_send));
weechat_printf_tags (
weechat_printf_date_tags (
irc_msgbuffer_get_target_buffer (
ptr_server, argv[arg_target], "notice", NULL,
(ptr_channel) ? ptr_channel->buffer : NULL),
0,
"notify_none,no_highlight",
"%s%s%s%s -> %s%s%s: %s",
weechat_prefix ("network"),

View File

@ -291,10 +291,11 @@ irc_ctcp_reply_to_nick (struct t_irc_server *server,
str_args_color = irc_color_decode (str_args, 1);
if (!str_args_color)
break;
weechat_printf_tags (
weechat_printf_date_tags (
irc_msgbuffer_get_target_buffer (
server, nick, NULL, "ctcp",
(channel) ? channel->buffer : NULL),
0,
irc_protocol_tags (
command,
"irc_ctcp,irc_ctcp_reply,notify_none,no_highlight",

View File

@ -98,8 +98,9 @@ irc_input_user_message_display (struct t_gui_buffer *buffer, int action,
ptr_text = (text_decoded) ? text_decoded : ((text2) ? text2 : text);
if (action)
{
weechat_printf_tags (
weechat_printf_date_tags (
buffer,
0,
irc_protocol_tags (
"privmsg", str_tags,
(ptr_nick) ? ptr_nick->name : ptr_server->nick,
@ -114,8 +115,9 @@ irc_input_user_message_display (struct t_gui_buffer *buffer, int action,
}
else
{
weechat_printf_tags (
weechat_printf_date_tags (
buffer,
0,
irc_protocol_tags (
"privmsg", str_tags,
(ptr_nick) ? ptr_nick->name : ptr_server->nick,

View File

@ -672,8 +672,9 @@ irc_notify_set_is_on_server (struct t_irc_notify *notify, const char *host,
if (notify->is_on_server == is_on_server)
return;
weechat_printf_tags (
weechat_printf_date_tags (
notify->server->buffer,
0,
irc_notify_get_tags (irc_config_look_notify_tags_ison,
(is_on_server) ? "join" : "quit",
notify->nick),
@ -719,8 +720,9 @@ irc_notify_set_away_message (struct t_irc_notify *notify,
if (!notify->away_message && away_message)
{
weechat_printf_tags (
weechat_printf_date_tags (
notify->server->buffer,
0,
irc_notify_get_tags (
irc_config_look_notify_tags_whois, "away", notify->nick),
_("%snotify: %s%s%s is now away: \"%s\""),
@ -733,8 +735,9 @@ irc_notify_set_away_message (struct t_irc_notify *notify,
}
else if (notify->away_message && !away_message)
{
weechat_printf_tags (
weechat_printf_date_tags (
notify->server->buffer,
0,
irc_notify_get_tags (
irc_config_look_notify_tags_whois, "back", notify->nick),
_("%snotify: %s%s%s is back"),
@ -746,8 +749,9 @@ irc_notify_set_away_message (struct t_irc_notify *notify,
}
else if (notify->away_message && away_message)
{
weechat_printf_tags (
weechat_printf_date_tags (
notify->server->buffer,
0,
irc_notify_get_tags (
irc_config_look_notify_tags_whois, "still_away", notify->nick),
_("%snotify: %s%s%s is still away: \"%s\""),

View File

@ -79,8 +79,7 @@ logger_buffer_add (struct t_gui_buffer *buffer, int log_level)
if (weechat_logger_plugin->debug)
{
weechat_printf_tags (NULL,
"no_log",
weechat_printf_date_tags (NULL, 0, "no_log",
"%s: start logging for buffer \"%s\"",
LOGGER_PLUGIN_NAME,
weechat_buffer_get_string (buffer, "name"));
@ -197,8 +196,8 @@ logger_buffer_free (struct t_logger_buffer *logger_buffer)
if (weechat_logger_plugin->debug)
{
weechat_printf_tags (NULL,
"no_log",
weechat_printf_date_tags (
NULL, 0, "no_log",
"%s: stop logging for buffer \"%s\"",
LOGGER_PLUGIN_NAME,
weechat_buffer_get_string (ptr_buffer, "name"));

View File

@ -94,8 +94,8 @@ logger_config_flush_delay_change (const void *pointer, void *data,
{
if (weechat_logger_plugin->debug)
{
weechat_printf_tags (NULL,
"no_log",
weechat_printf_date_tags (
NULL, 0, "no_log",
"%s: stopping timer", LOGGER_PLUGIN_NAME);
}
weechat_unhook (logger_timer);
@ -106,8 +106,8 @@ logger_config_flush_delay_change (const void *pointer, void *data,
{
if (weechat_logger_plugin->debug)
{
weechat_printf_tags (NULL,
"no_log",
weechat_printf_date_tags (
NULL, 0, "no_log",
"%s: starting timer (interval: %d seconds)",
LOGGER_PLUGIN_NAME,
weechat_config_integer (logger_config_file_flush_delay));

View File

@ -97,8 +97,7 @@ logger_get_file_path ()
if (weechat_logger_plugin->debug)
{
weechat_printf_tags (NULL,
"no_log",
weechat_printf_date_tags (NULL, 0, "no_log",
"%s: file path = \"%s\"",
LOGGER_PLUGIN_NAME, path2);
}
@ -364,8 +363,7 @@ logger_get_mask_expanded (struct t_gui_buffer *buffer, const char *mask)
if (weechat_logger_plugin->debug)
{
weechat_printf_tags (NULL,
"no_log",
weechat_printf_date_tags (NULL, 0, "no_log",
"%s: buffer = \"%s\", mask = \"%s\", "
"decoded mask = \"%s\"",
LOGGER_PLUGIN_NAME,
@ -417,8 +415,8 @@ logger_get_filename (struct t_gui_buffer *buffer)
mask = logger_get_mask_for_buffer (buffer);
if (!mask)
{
weechat_printf_tags (NULL,
"no_log",
weechat_printf_date_tags (
NULL, 0, "no_log",
_("%s%s: unable to find filename mask for buffer "
"\"%s\", logging is disabled for this buffer"),
weechat_prefix ("error"), LOGGER_PLUGIN_NAME,
@ -470,8 +468,7 @@ logger_set_log_filename (struct t_logger_buffer *logger_buffer)
log_filename = logger_get_filename (logger_buffer->buffer);
if (!log_filename)
{
weechat_printf_tags (NULL,
"no_log",
weechat_printf_date_tags (NULL, 0, "no_log",
_("%s%s: not enough memory"),
weechat_prefix ("error"),
LOGGER_PLUGIN_NAME);
@ -482,8 +479,8 @@ logger_set_log_filename (struct t_logger_buffer *logger_buffer)
ptr_logger_buffer = logger_buffer_search_log_filename (log_filename);
if (ptr_logger_buffer)
{
weechat_printf_tags (NULL,
"no_log",
weechat_printf_date_tags (
NULL, 0, "no_log",
_("%s%s: unable to start logging for buffer "
"\"%s\": filename \"%s\" is already used by "
"another buffer (check your log settings)"),
@ -538,8 +535,8 @@ logger_write_line (struct t_logger_buffer *logger_buffer,
}
if (!logger_create_directory ())
{
weechat_printf_tags (NULL,
"no_log",
weechat_printf_date_tags (
NULL, 0, "no_log",
_("%s%s: unable to create directory for logs "
"(\"%s\")"),
weechat_prefix ("error"), LOGGER_PLUGIN_NAME,
@ -559,9 +556,8 @@ logger_write_line (struct t_logger_buffer *logger_buffer,
fopen (logger_buffer->log_filename, "a");
if (!logger_buffer->log_file)
{
weechat_printf_tags (
NULL,
"no_log",
weechat_printf_date_tags (
NULL, 0, "no_log",
_("%s%s: unable to write log file \"%s\": %s"),
weechat_prefix ("error"), LOGGER_PLUGIN_NAME,
logger_buffer->log_filename, strerror (errno));
@ -839,8 +835,7 @@ logger_flush ()
{
if (weechat_logger_plugin->debug >= 2)
{
weechat_printf_tags (NULL,
"no_log",
weechat_printf_date_tags (NULL, 0, "no_log",
"%s: flush file %s",
LOGGER_PLUGIN_NAME,
ptr_logger_buffer->log_filename);

View File

@ -257,9 +257,9 @@ relay_client_handshake_timer_cb (const void *pointer, void *data,
if (gnutls_error_is_fatal (rc))
{
/* handshake error, disconnect client */
weechat_printf_tags (NULL, "relay_client",
_("%s%s: TLS handshake failed for client %s%s%s: "
"error %d %s"),
weechat_printf_date_tags (
NULL, 0, "relay_client",
_("%s%s: TLS handshake failed for client %s%s%s: error %d %s"),
weechat_prefix ("error"),
RELAY_PLUGIN_NAME,
RELAY_COLOR_CHAT_CLIENT,
@ -276,7 +276,8 @@ relay_client_handshake_timer_cb (const void *pointer, void *data,
if (remaining_calls == 0)
{
/* handshake timeout, disconnect client */
weechat_printf_tags (NULL, "relay_client",
weechat_printf_date_tags (
NULL, 0, "relay_client",
_("%s%s: TLS handshake timeout for client %s%s%s"),
weechat_prefix ("error"),
RELAY_PLUGIN_NAME,
@ -386,10 +387,11 @@ relay_client_recv_text (struct t_relay_client *client, const char *data)
"400 Bad Request");
if (weechat_relay_plugin->debug >= 1)
{
weechat_printf_tags (NULL, "relay_client",
weechat_printf_date_tags (
NULL, 0, "relay_client",
_("%s%s: invalid websocket "
"handshake received for "
"client %s%s%s"),
"handshake received for client "
"%s%s%s"),
weechat_prefix ("error"),
RELAY_PLUGIN_NAME,
RELAY_COLOR_CHAT_CLIENT,
@ -402,7 +404,8 @@ relay_client_recv_text (struct t_relay_client *client, const char *data)
"403 Forbidden");
if (weechat_relay_plugin->debug >= 1)
{
weechat_printf_tags (NULL, "relay_client",
weechat_printf_date_tags (
NULL, 0, "relay_client",
_("%s%s: origin \"%s\" "
"not allowed for websocket"),
weechat_prefix ("error"),
@ -419,8 +422,8 @@ relay_client_recv_text (struct t_relay_client *client, const char *data)
client->http_headers, "X-Real-IP");
if (ptr_real_ip)
{
weechat_printf_tags (
NULL, "relay_client",
weechat_printf_date_tags (
NULL, 0, "relay_client",
_("%s: websocket client %s%s%s has real IP "
"address \"%s\""),
RELAY_PLUGIN_NAME,
@ -610,9 +613,10 @@ relay_client_recv_cb (const void *pointer, void *data, int fd)
if (!rc)
{
/* error when decoding frame: close connection */
weechat_printf_tags (NULL, "relay_client",
_("%s%s: error decoding websocket frame "
"for client %s%s%s"),
weechat_printf_date_tags (
NULL, 0, "relay_client",
_("%s%s: error decoding websocket frame for client "
"%s%s%s"),
weechat_prefix ("error"), RELAY_PLUGIN_NAME,
RELAY_COLOR_CHAT_CLIENT,
client->desc,
@ -645,9 +649,10 @@ relay_client_recv_cb (const void *pointer, void *data, int fd)
if ((num_read == 0)
|| ((num_read != GNUTLS_E_AGAIN) && (num_read != GNUTLS_E_INTERRUPTED)))
{
weechat_printf_tags (NULL, "relay_client",
_("%s%s: reading data on socket for "
"client %s%s%s: error %d %s"),
weechat_printf_date_tags (
NULL, 0, "relay_client",
_("%s%s: reading data on socket for client %s%s%s: "
"error %d %s"),
weechat_prefix ("error"), RELAY_PLUGIN_NAME,
RELAY_COLOR_CHAT_CLIENT,
client->desc,
@ -664,9 +669,10 @@ relay_client_recv_cb (const void *pointer, void *data, int fd)
if ((num_read == 0)
|| ((errno != EAGAIN) && (errno != EWOULDBLOCK)))
{
weechat_printf_tags (NULL, "relay_client",
_("%s%s: reading data on socket for "
"client %s%s%s: error %d %s"),
weechat_printf_date_tags (
NULL, 0, "relay_client",
_("%s%s: reading data on socket for client %s%s%s: "
"error %d %s"),
weechat_prefix ("error"), RELAY_PLUGIN_NAME,
RELAY_COLOR_CHAT_CLIENT,
client->desc,
@ -956,9 +962,9 @@ relay_client_send (struct t_relay_client *client,
}
else
{
weechat_printf_tags (NULL, "relay_client",
_("%s%s: sending data to client %s%s%s: "
"error %d %s"),
weechat_printf_date_tags (
NULL, 0, "relay_client",
_("%s%s: sending data to client %s%s%s: error %d %s"),
weechat_prefix ("error"),
RELAY_PLUGIN_NAME,
RELAY_COLOR_CHAT_CLIENT,
@ -981,9 +987,9 @@ relay_client_send (struct t_relay_client *client,
}
else
{
weechat_printf_tags (NULL, "relay_client",
_("%s%s: sending data to client %s%s%s: "
"error %d %s"),
weechat_printf_date_tags (
NULL, 0, "relay_client",
_("%s%s: sending data to client %s%s%s: error %d %s"),
weechat_prefix ("error"),
RELAY_PLUGIN_NAME,
RELAY_COLOR_CHAT_CLIENT,
@ -1125,9 +1131,10 @@ relay_client_timer_cb (const void *pointer, void *data, int remaining_calls)
}
else
{
weechat_printf_tags (NULL, "relay_client",
_("%s%s: sending data to client "
"%s%s%s: error %d %s"),
weechat_printf_date_tags (
NULL, 0, "relay_client",
_("%s%s: sending data to client %s%s%s: "
"error %d %s"),
weechat_prefix ("error"),
RELAY_PLUGIN_NAME,
RELAY_COLOR_CHAT_CLIENT,
@ -1149,9 +1156,10 @@ relay_client_timer_cb (const void *pointer, void *data, int remaining_calls)
}
else
{
weechat_printf_tags (NULL, "relay_client",
_("%s%s: sending data to client "
"%s%s%s: error %d %s"),
weechat_printf_date_tags (
NULL, 0, "relay_client",
_("%s%s: sending data to client %s%s%s: "
"error %d %s"),
weechat_prefix ("error"),
RELAY_PLUGIN_NAME,
RELAY_COLOR_CHAT_CLIENT,
@ -1238,9 +1246,9 @@ relay_client_new (int sock, const char *address, struct t_relay_server *server)
{
if (!relay_network_init_ssl_cert_key_ok)
{
weechat_printf_tags (NULL, "relay_client",
_("%s%s: warning: no SSL certificate/key "
"found (option "
weechat_printf_date_tags (
NULL, 0, "relay_client",
_("%s%s: warning: no SSL certificate/key found (option "
"relay.network.ssl_cert_key)"),
weechat_prefix ("error"),
RELAY_PLUGIN_NAME);
@ -1310,7 +1318,7 @@ relay_client_new (int sock, const char *address, struct t_relay_server *server)
last_relay_client = new_client;
relay_clients = new_client;
weechat_printf_tags (NULL, "relay_client",
weechat_printf_date_tags (NULL, 0, "relay_client",
_("%s: new client on port %d: %s%s%s"),
RELAY_PLUGIN_NAME,
server->port,
@ -1337,7 +1345,7 @@ relay_client_new (int sock, const char *address, struct t_relay_server *server)
}
else
{
weechat_printf_tags (NULL, "relay_client",
weechat_printf_date_tags (NULL, 0, "relay_client",
_("%s%s: not enough memory for new client"),
weechat_prefix ("error"), RELAY_PLUGIN_NAME);
}
@ -1488,7 +1496,7 @@ relay_client_set_status (struct t_relay_client *client,
switch (client->status)
{
case RELAY_STATUS_AUTH_FAILED:
weechat_printf_tags (NULL, "relay_client",
weechat_printf_date_tags (NULL, 0, "relay_client",
_("%s%s: authentication failed with "
"client %s%s%s"),
weechat_prefix ("error"),
@ -1498,7 +1506,8 @@ relay_client_set_status (struct t_relay_client *client,
RELAY_COLOR_CHAT);
break;
case RELAY_STATUS_DISCONNECTED:
weechat_printf_tags (NULL, "relay_client",
weechat_printf_date_tags (
NULL, 0, "relay_client",
_("%s: disconnected from client %s%s%s"),
RELAY_PLUGIN_NAME,
RELAY_COLOR_CHAT_CLIENT,

View File

@ -254,7 +254,8 @@ trigger_buffer_hashtable_map_cb (void *data,
{
value_no_color = (weechat_config_boolean (trigger_config_look_monitor_strip_colors)) ?
weechat_string_remove_color ((const char *)value, NULL) : NULL;
weechat_printf_tags (trigger_buffer, "no_trigger",
weechat_printf_date_tags (
trigger_buffer, 0, "no_trigger",
"\t %s: %s\"%s%s%s\"",
(char *)key,
weechat_color ("chat_delimiters"),
@ -266,7 +267,7 @@ trigger_buffer_hashtable_map_cb (void *data,
}
else if (strcmp (value_type, "pointer") == 0)
{
weechat_printf_tags (trigger_buffer, "no_trigger",
weechat_printf_date_tags (trigger_buffer, 0, "no_trigger",
"\t %s: 0x%lx",
(char *)key,
value);
@ -284,7 +285,7 @@ trigger_buffer_display_hashtable (const char *name,
if (!trigger_buffer)
return;
weechat_printf_tags (trigger_buffer, "no_trigger", " %s:", name);
weechat_printf_date_tags (trigger_buffer, 0, "no_trigger", " %s:", name);
weechat_hashtable_map (hashtable, &trigger_buffer_hashtable_map_cb, NULL);
}
@ -310,7 +311,8 @@ trigger_buffer_display_trigger (struct t_trigger *trigger,
if (!trigger_buffer_match_filters (trigger))
return 0;
weechat_printf_tags (trigger_buffer, "no_trigger",
weechat_printf_date_tags (
trigger_buffer, 0, "no_trigger",
"%s\t%s%s %s(%s%s%s)",
trigger_hook_type_string[weechat_config_integer (trigger->options[TRIGGER_OPTION_HOOK])],
weechat_color (weechat_config_string (trigger_config_color_trigger)),
@ -321,7 +323,8 @@ trigger_buffer_display_trigger (struct t_trigger *trigger,
weechat_color ("chat_delimiters"));
if (buffer)
{
weechat_printf_tags (trigger_buffer, "no_trigger",
weechat_printf_date_tags (
trigger_buffer, 0, "no_trigger",
"\t buffer: %s%s",
weechat_color ("chat_buffer"),
weechat_buffer_get_string (buffer, "full_name"));

View File

@ -205,7 +205,7 @@ trigger_callback_replace_regex (struct t_trigger *trigger,
{
if (trigger_buffer && display_monitor)
{
weechat_printf_tags (trigger_buffer, "no_trigger",
weechat_printf_date_tags (trigger_buffer, 0, "no_trigger",
"\t regex %d: %s",
i + 1, _("no variable"));
}
@ -217,7 +217,7 @@ trigger_callback_replace_regex (struct t_trigger *trigger,
{
if (trigger_buffer && display_monitor)
{
weechat_printf_tags (trigger_buffer, "no_trigger",
weechat_printf_date_tags (trigger_buffer, 0, "no_trigger",
"\t regex %d (%s): %s",
i + 1, ptr_key, _("empty variable"));
}
@ -240,7 +240,7 @@ trigger_callback_replace_regex (struct t_trigger *trigger,
/* display debug info on trigger buffer */
if (trigger_buffer && display_monitor)
{
weechat_printf_tags (trigger_buffer, "no_trigger",
weechat_printf_date_tags (trigger_buffer, 0, "no_trigger",
"\t regex %d %s(%s%s%s)%s: "
"%s\"%s%s%s\"",
i + 1,
@ -299,7 +299,8 @@ trigger_callback_run_command (struct t_trigger *trigger,
/* display debug info on trigger buffer */
if (trigger_buffer && display_monitor)
{
weechat_printf_tags (trigger_buffer, "no_trigger",
weechat_printf_date_tags (
trigger_buffer, 0, "no_trigger",
_("%s running command %s\"%s%s%s\"%s "
"on buffer %s%s%s"),
"\t",

View File

@ -36,7 +36,7 @@
void
trigger_command_display_status ()
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
(trigger_enabled) ?
_("Triggers enabled") : _("Triggers disabled"));
}
@ -67,8 +67,8 @@ trigger_command_display_trigger_internal (const char *name,
if (verbose >= 1)
{
weechat_printf_tags (
NULL, "no_trigger",
weechat_printf_date_tags (
NULL, 0, "no_trigger",
" %s%s%s: %s%s%s%s%s%s%s",
(enabled) ?
weechat_color (weechat_config_string (trigger_config_color_trigger)) :
@ -89,18 +89,19 @@ trigger_command_display_trigger_internal (const char *name,
spaces[length] = '\0';
if (verbose >= 2)
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
"%s hooks: %d", spaces, hooks_count);
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
"%s callback: %d",
spaces, hook_count_cb);
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
"%s commands: %d",
spaces, hook_count_cmd);
}
if (conditions && conditions[0])
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (
NULL, 0, "no_trigger",
"%s %s=? %s\"%s%s%s\"",
spaces,
weechat_color (weechat_config_string (trigger_config_color_flag_conditions)),
@ -111,7 +112,8 @@ trigger_command_display_trigger_internal (const char *name,
}
for (i = 0; i < regex_count; i++)
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (
NULL, 0, "no_trigger",
"%s %s~%d %s\"%s%s%s\" --> "
"\"%s%s%s\"%s%s%s%s",
spaces,
@ -133,7 +135,8 @@ trigger_command_display_trigger_internal (const char *name,
{
for (i = 0; commands[i]; i++)
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (
NULL, 0, "no_trigger",
"%s %s/%d %s\"%s%s%s\"",
spaces,
weechat_color (weechat_config_string (trigger_config_color_flag_command)),
@ -146,7 +149,8 @@ trigger_command_display_trigger_internal (const char *name,
}
if ((return_code >= 0) && (return_code != TRIGGER_RC_OK))
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (
NULL, 0, "no_trigger",
"%s %s=> %s%s",
spaces,
weechat_color (weechat_config_string (trigger_config_color_flag_return_code)),
@ -190,8 +194,8 @@ trigger_command_display_trigger_internal (const char *name,
weechat_color (weechat_config_string (trigger_config_color_flag_return_code)),
weechat_color ("reset"));
}
weechat_printf_tags (
NULL, "no_trigger",
weechat_printf_date_tags (
NULL, 0, "no_trigger",
" %s%s%s: %s%s%s%s%s%s%s%s%s%s%s%s",
(enabled) ?
weechat_color (weechat_config_string (trigger_config_color_trigger)) :
@ -246,16 +250,17 @@ trigger_command_list (const char *message, int verbose)
{
struct t_trigger *ptr_trigger;
weechat_printf_tags (NULL, "no_trigger", "");
weechat_printf_date_tags (NULL, 0, "no_trigger", "");
trigger_command_display_status ();
if (!triggers)
{
weechat_printf_tags (NULL, "no_trigger", _("No trigger defined"));
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("No trigger defined"));
return;
}
weechat_printf_tags (NULL, "no_trigger", message);
weechat_printf_date_tags (NULL, 0, "no_trigger", message);
for (ptr_trigger = triggers; ptr_trigger;
ptr_trigger = ptr_trigger->next_trigger)
@ -280,8 +285,9 @@ trigger_command_list_default (int verbose)
commands_count = 0;
commands = NULL;
weechat_printf_tags (NULL, "no_trigger", "");
weechat_printf_tags (NULL, "no_trigger", _("List of default triggers:"));
weechat_printf_date_tags (NULL, 0, "no_trigger", "");
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("List of default triggers:"));
for (i = 0; trigger_config_default_list[i][0]; i++)
{
@ -321,9 +327,10 @@ trigger_command_list_default (int verbose)
void
trigger_command_error_running (struct t_trigger *trigger, const char *action)
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("%s%s: action \"%s\" can not be executed on "
"trigger \"%s\" because it is currently running"),
"trigger \"%s\" because it is currently "
"running"),
weechat_prefix ("error"), TRIGGER_PLUGIN_NAME,
action, trigger->name);
}
@ -354,16 +361,17 @@ trigger_command_set_enabled (struct t_trigger *trigger,
if (weechat_config_boolean (trigger->options[TRIGGER_OPTION_ENABLED]))
{
trigger_hook (trigger);
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("Trigger \"%s\" restarted"),
trigger->name);
}
else if (display_error)
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("%s%s: a disabled trigger can not be "
"restarted"),
weechat_prefix ("error"), TRIGGER_PLUGIN_NAME);
weechat_prefix ("error"),
TRIGGER_PLUGIN_NAME);
}
}
else
@ -375,7 +383,7 @@ trigger_command_set_enabled (struct t_trigger *trigger,
}
weechat_config_option_set (trigger->options[TRIGGER_OPTION_ENABLED],
(enable) ? "on" : "off", 1);
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
(enable) ?
_("Trigger \"%s\" enabled") :
_("Trigger \"%s\" disabled"),
@ -404,16 +412,17 @@ trigger_command_rename (struct t_trigger *trigger, const char *new_name)
/* check that new name is valid */
if (!trigger_name_valid (name2))
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("%s%s: invalid trigger name: \"%s\""),
weechat_prefix ("error"), TRIGGER_PLUGIN_NAME,
weechat_prefix ("error"),
TRIGGER_PLUGIN_NAME,
name2);
goto end;
}
/* check that no trigger already exists with the new name */
if (trigger_search (name2))
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("%s%s: trigger \"%s\" already "
"exists"),
weechat_prefix ("error"), TRIGGER_PLUGIN_NAME,
@ -423,16 +432,17 @@ trigger_command_rename (struct t_trigger *trigger, const char *new_name)
/* rename the trigger */
if (trigger_rename (trigger, name2))
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("Trigger \"%s\" renamed to \"%s\""),
name, trigger->name);
}
else
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("%s%s: failed to rename trigger "
"\"%s\""),
weechat_prefix ("error"), TRIGGER_PLUGIN_NAME,
weechat_prefix ("error"),
TRIGGER_PLUGIN_NAME,
name);
}
}
@ -498,18 +508,20 @@ trigger_command_trigger (const void *pointer, void *data,
goto error;
if (!trigger_name_valid (sargv[0]))
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("%s%s: invalid trigger name: \"%s\""),
weechat_prefix ("error"), TRIGGER_PLUGIN_NAME,
weechat_prefix ("error"),
TRIGGER_PLUGIN_NAME,
sargv[0]);
goto end;
}
type = trigger_search_hook_type (sargv[1]);
if (type < 0)
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("%s%s: invalid hook type: \"%s\""),
weechat_prefix ("error"), TRIGGER_PLUGIN_NAME,
weechat_prefix ("error"),
TRIGGER_PLUGIN_NAME,
sargv[1]);
goto end;
}
@ -551,9 +563,10 @@ trigger_command_trigger (const void *pointer, void *data,
if ((sargc > 6) && sargv[6][0]
&& (trigger_search_return_code (sargv[6]) < 0))
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("%s%s: invalid return code: \"%s\""),
weechat_prefix ("error"), TRIGGER_PLUGIN_NAME,
weechat_prefix ("error"),
TRIGGER_PLUGIN_NAME,
sargv[6]);
goto end;
}
@ -574,7 +587,8 @@ trigger_command_trigger (const void *pointer, void *data,
}
else
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (
NULL, 0, "no_trigger",
_("%s%s: trigger \"%s\" already exists "
"(choose another name or use option "
"\"addreplace\" to overwrite it)"),
@ -586,7 +600,8 @@ trigger_command_trigger (const void *pointer, void *data,
ptr_trigger = trigger_alloc (sargv[0]);
if (!ptr_trigger)
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (
NULL, 0, "no_trigger",
_("%s%s: failed to create trigger \"%s\""),
weechat_prefix ("error"), TRIGGER_PLUGIN_NAME,
sargv[0]);
@ -603,12 +618,14 @@ trigger_command_trigger (const void *pointer, void *data,
(sargc > 6) ? sargv[6] : ""); /* return code */
if (ptr_trigger)
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (
NULL, 0, "no_trigger",
_("Trigger \"%s\" created"), sargv[0]);
}
else
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (
NULL, 0, "no_trigger",
_("%s%s: failed to create trigger \"%s\""),
weechat_prefix ("error"), TRIGGER_PLUGIN_NAME,
sargv[0]);
@ -625,7 +642,7 @@ trigger_command_trigger (const void *pointer, void *data,
type = trigger_search_hook_type (argv[2]);
if (type < 0)
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("%s%s: invalid hook type: \"%s\""),
weechat_prefix ("error"),
TRIGGER_PLUGIN_NAME, argv[2]);
@ -664,9 +681,10 @@ trigger_command_trigger (const void *pointer, void *data,
ptr_trigger = trigger_search (argv[2]);
if (!ptr_trigger)
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("%s%s: trigger \"%s\" not found"),
weechat_prefix ("error"), TRIGGER_PLUGIN_NAME,
weechat_prefix ("error"),
TRIGGER_PLUGIN_NAME,
argv[2]);
goto end;
}
@ -705,9 +723,10 @@ trigger_command_trigger (const void *pointer, void *data,
ptr_trigger = trigger_search (argv[2]);
if (!ptr_trigger)
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("%s%s: trigger \"%s\" not found"),
weechat_prefix ("error"), TRIGGER_PLUGIN_NAME,
weechat_prefix ("error"),
TRIGGER_PLUGIN_NAME,
argv[2]);
goto end;
}
@ -729,13 +748,13 @@ trigger_command_trigger (const void *pointer, void *data,
{
weechat_config_option_set (ptr_trigger->options[index_option],
value, 1);
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("Trigger \"%s\" updated"),
ptr_trigger->name);
}
else
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("%s%s: trigger option \"%s\" not "
"found"),
weechat_prefix ("error"),
@ -754,9 +773,10 @@ trigger_command_trigger (const void *pointer, void *data,
ptr_trigger = trigger_search (argv[2]);
if (!ptr_trigger)
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("%s%s: trigger \"%s\" not found"),
weechat_prefix ("error"), TRIGGER_PLUGIN_NAME,
weechat_prefix ("error"),
TRIGGER_PLUGIN_NAME,
argv[2]);
goto end;
}
@ -777,28 +797,31 @@ trigger_command_trigger (const void *pointer, void *data,
ptr_trigger = trigger_search (argv[2]);
if (!ptr_trigger)
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("%s%s: trigger \"%s\" not found"),
weechat_prefix ("error"), TRIGGER_PLUGIN_NAME,
weechat_prefix ("error"),
TRIGGER_PLUGIN_NAME,
argv[2]);
goto end;
}
/* check that new name is valid */
if (!trigger_name_valid (argv[3]))
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("%s%s: invalid trigger name: \"%s\""),
weechat_prefix ("error"), TRIGGER_PLUGIN_NAME,
weechat_prefix ("error"),
TRIGGER_PLUGIN_NAME,
argv[3]);
goto end;
}
/* check that no trigger already exists with the new name */
if (trigger_search (argv[3]))
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("%s%s: trigger \"%s\" already "
"exists"),
weechat_prefix ("error"), TRIGGER_PLUGIN_NAME,
weechat_prefix ("error"),
TRIGGER_PLUGIN_NAME,
argv[3]);
goto end;
}
@ -806,16 +829,17 @@ trigger_command_trigger (const void *pointer, void *data,
ptr_trigger2 = trigger_copy (ptr_trigger, argv[3]);
if (ptr_trigger2)
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("Trigger \"%s\" copied to \"%s\""),
ptr_trigger->name, ptr_trigger2->name);
}
else
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("%s%s: failed to copy trigger "
"\"%s\""),
weechat_prefix ("error"), TRIGGER_PLUGIN_NAME,
weechat_prefix ("error"),
TRIGGER_PLUGIN_NAME,
ptr_trigger->name);
}
goto end;
@ -869,9 +893,10 @@ trigger_command_trigger (const void *pointer, void *data,
1);
else
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("%sTrigger \"%s\" not found"),
weechat_prefix ("error"), argv[i]);
weechat_prefix ("error"),
argv[i]);
}
}
}
@ -902,7 +927,7 @@ trigger_command_trigger (const void *pointer, void *data,
}
count = count - triggers_count;
if (count > 0)
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("%d triggers removed"), count);
}
else
@ -919,15 +944,17 @@ trigger_command_trigger (const void *pointer, void *data,
else
{
trigger_free (ptr_trigger);
weechat_printf_tags (NULL, "no_trigger",
_("Trigger \"%s\" removed"), argv[i]);
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("Trigger \"%s\" removed"),
argv[i]);
}
}
else
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("%sTrigger \"%s\" not found"),
weechat_prefix ("error"), argv[i]);
weechat_prefix ("error"),
argv[i]);
}
}
}
@ -942,14 +969,15 @@ trigger_command_trigger (const void *pointer, void *data,
ptr_trigger = trigger_search (argv[2]);
if (!ptr_trigger)
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("%s%s: trigger \"%s\" not found"),
weechat_prefix ("error"), TRIGGER_PLUGIN_NAME,
weechat_prefix ("error"),
TRIGGER_PLUGIN_NAME,
argv[2]);
goto end;
}
weechat_printf_tags (NULL, "no_trigger", "");
weechat_printf_tags (NULL, "no_trigger", _("Trigger:"));
weechat_printf_date_tags (NULL, 0, "no_trigger", "");
weechat_printf_date_tags (NULL, 0, "no_trigger", _("Trigger:"));
trigger_command_display_trigger (ptr_trigger, 2);
goto end;
}
@ -989,14 +1017,15 @@ trigger_command_trigger (const void *pointer, void *data,
trigger_config_default_list[j][5], /* regex */
trigger_config_default_list[j][6], /* command */
trigger_config_default_list[j][7]); /* return code */
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (NULL, 0, "no_trigger",
_("Trigger \"%s\" restored"),
argv[i]);
}
}
else
{
weechat_printf_tags (NULL, "no_trigger",
weechat_printf_date_tags (
NULL, 0, "no_trigger",
_("%sDefault trigger \"%s\" not found"),
weechat_prefix ("error"), argv[i]);
}

View File

@ -57,7 +57,7 @@ struct timeval;
* please change the date with current one; for a second change at same
* date, increment the 01, otherwise please keep 01.
*/
#define WEECHAT_PLUGIN_API_VERSION "20160423-01"
#define WEECHAT_PLUGIN_API_VERSION "20160618-01"
/* macros for defining plugin infos */
#define WEECHAT_PLUGIN_NAME(__name) \
@ -1495,12 +1495,6 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
#define weechat_printf(__buffer, __message, __argz...) \
(weechat_plugin->printf_date_tags)(__buffer, 0, NULL, __message, \
##__argz)
#define weechat_printf_date(__buffer, __date, __message, __argz...) \
(weechat_plugin->printf_date_tags)(__buffer, __date, NULL, \
__message, ##__argz)
#define weechat_printf_tags(__buffer, __tags, __message, __argz...) \
(weechat_plugin->printf_date_tags)(__buffer, 0, __tags, __message, \
##__argz)
#define weechat_printf_date_tags(__buffer, __date, __tags, __message, \
__argz...) \
(weechat_plugin->printf_date_tags)(__buffer, __date, __tags, \

View File

@ -200,7 +200,9 @@ xfer_chat_recv_cb (const void *pointer, void *data, int fd)
(pv_tags && pv_tags[0]) ? pv_tags : "",
(pv_tags && pv_tags[0]) ? "," : "",
xfer->remote_nick);
weechat_printf_tags (xfer->buffer,
weechat_printf_date_tags (
xfer->buffer,
0,
str_tags,
"%s%s%s%s%s%s",
weechat_prefix ("action"),
@ -224,10 +226,13 @@ xfer_chat_recv_cb (const void *pointer, void *data, int fd)
xfer->remote_nick);
if (str_color)
free (str_color);
weechat_printf_tags (xfer->buffer,
weechat_printf_date_tags (
xfer->buffer,
0,
str_tags,
"%s%s\t%s",
weechat_color ((xfer->remote_nick_color) ?
weechat_color (
(xfer->remote_nick_color) ?
xfer->remote_nick_color : "chat_nick_other"),
xfer->remote_nick,
ptr_buf2);
@ -290,7 +295,9 @@ xfer_chat_buffer_input_cb (const void *pointer, void *data,
input_data_color = weechat_hook_modifier_exec ("irc_color_decode",
"1",
input_data);
weechat_printf_tags (buffer,
weechat_printf_date_tags (
buffer,
0,
str_tags,
"%s%s\t%s",
weechat_color ("chat_nick_self"),

View File

@ -62,7 +62,8 @@ xfer_command_me (const void *pointer, void *data,
{
xfer_chat_sendf (ptr_xfer, "\01ACTION %s\01\r\n",
(argv_eol[1]) ? argv_eol[1] : "");
weechat_printf_tags (buffer,
weechat_printf_date_tags (buffer,
0,
"no_highlight",
"%s%s%s %s%s",
weechat_prefix ("action"),