summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2020-05-09 10:08:18 +0200
committerSébastien Helleu <flashcode@flashtux.org>2020-05-09 10:08:18 +0200
commit3505324096051e14d292c17e96946358e973311f (patch)
tree490e2ece0d876004c423eef418b23413a031b1e7 /src/gui
parent7f1aeae5fb7face754203edcc6190a0ff29c31ee (diff)
downloadweechat-3505324096051e14d292c17e96946358e973311f.zip
api: use buffer pointer in argument "modifier_data" sent to weechat_print modifier callback (closes #42)
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui-chat.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/gui/gui-chat.c b/src/gui/gui-chat.c
index 2aee82c8b..e68761d19 100644
--- a/src/gui/gui-chat.c
+++ b/src/gui/gui-chat.c
@@ -761,12 +761,7 @@ gui_chat_printf_date_tags_internal (struct t_gui_buffer *buffer,
goto no_print;
/* call modifier for message printed ("weechat_print") */
- length_data = strlen (gui_buffer_get_plugin_name (new_line->data->buffer)) +
- 1 +
- strlen (new_line->data->buffer->name) +
- 1 +
- ((tags) ? strlen (tags) : 0) +
- 1;
+ length_data = 64 + 1 + ((tags) ? strlen (tags) : 0) + 1;
modifier_data = malloc (length_data);
length_str = ((new_line->data->prefix && new_line->data->prefix[0]) ? strlen (new_line->data->prefix) : 1) +
1 +
@@ -776,9 +771,8 @@ gui_chat_printf_date_tags_internal (struct t_gui_buffer *buffer,
if (modifier_data && string)
{
snprintf (modifier_data, length_data,
- "%s;%s;%s",
- gui_buffer_get_plugin_name (new_line->data->buffer),
- new_line->data->buffer->name,
+ "0x%lx;%s",
+ (unsigned long)buffer,
(tags) ? tags : "");
if (display_time)
{