diff --git a/ChangeLog b/ChangeLog index d4c8db8a5..6582d8075 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,11 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -ChangeLog - 2007-04-24 +ChangeLog - 2007-04-25 Version 0.2.5 (under dev!): + * fixed string format bug when displaying string thru plugin script API * added /reconnect command (task #5448) * added "-all" option for /connect and /disconnect commands (task #6232) * improved nick completion: completion with last speakers first and self diff --git a/src/plugins/scripts/weechat-script.c b/src/plugins/scripts/weechat-script.c index 58392581b..b7511f22b 100644 --- a/src/plugins/scripts/weechat-script.c +++ b/src/plugins/scripts/weechat-script.c @@ -326,7 +326,7 @@ weechat_script_print (t_weechat_plugin *plugin, buf2 = (script->charset && script->charset[0]) ? plugin->iconv_to_internal (plugin, script->charset, buf) : NULL; - plugin->print (plugin, server, channel, (buf2) ? buf2 : buf); + plugin->print (plugin, server, channel, "%s", (buf2) ? buf2 : buf); if (buf2) free (buf2); } @@ -350,7 +350,7 @@ weechat_script_print_server (t_weechat_plugin *plugin, buf2 = (script->charset && script->charset[0]) ? plugin->iconv_to_internal (plugin, script->charset, buf) : NULL; - plugin->print_server (plugin, (buf2) ? buf2 : buf); + plugin->print_server (plugin, "%s", (buf2) ? buf2 : buf); if (buf2) free (buf2); } @@ -374,7 +374,7 @@ weechat_script_print_infobar (t_weechat_plugin *plugin, buf2 = (script->charset && script->charset[0]) ? plugin->iconv_to_internal (plugin, script->charset, buf) : NULL; - plugin->print_infobar (plugin, time_displayed, (buf2) ? buf2 : buf); + plugin->print_infobar (plugin, time_displayed, "%s", (buf2) ? buf2 : buf); if (buf2) free (buf2); } @@ -398,7 +398,7 @@ weechat_script_log (t_weechat_plugin *plugin, buf2 = (script->charset && script->charset[0]) ? plugin->iconv_to_internal (plugin, script->charset, buf) : NULL; - plugin->log (plugin, server, channel, (buf2) ? buf2 : buf); + plugin->log (plugin, server, channel, "%s", (buf2) ? buf2 : buf); if (buf2) free (buf2); } diff --git a/weechat/ChangeLog b/weechat/ChangeLog index d4c8db8a5..6582d8075 100644 --- a/weechat/ChangeLog +++ b/weechat/ChangeLog @@ -1,10 +1,11 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -ChangeLog - 2007-04-24 +ChangeLog - 2007-04-25 Version 0.2.5 (under dev!): + * fixed string format bug when displaying string thru plugin script API * added /reconnect command (task #5448) * added "-all" option for /connect and /disconnect commands (task #6232) * improved nick completion: completion with last speakers first and self diff --git a/weechat/src/plugins/scripts/weechat-script.c b/weechat/src/plugins/scripts/weechat-script.c index 58392581b..b7511f22b 100644 --- a/weechat/src/plugins/scripts/weechat-script.c +++ b/weechat/src/plugins/scripts/weechat-script.c @@ -326,7 +326,7 @@ weechat_script_print (t_weechat_plugin *plugin, buf2 = (script->charset && script->charset[0]) ? plugin->iconv_to_internal (plugin, script->charset, buf) : NULL; - plugin->print (plugin, server, channel, (buf2) ? buf2 : buf); + plugin->print (plugin, server, channel, "%s", (buf2) ? buf2 : buf); if (buf2) free (buf2); } @@ -350,7 +350,7 @@ weechat_script_print_server (t_weechat_plugin *plugin, buf2 = (script->charset && script->charset[0]) ? plugin->iconv_to_internal (plugin, script->charset, buf) : NULL; - plugin->print_server (plugin, (buf2) ? buf2 : buf); + plugin->print_server (plugin, "%s", (buf2) ? buf2 : buf); if (buf2) free (buf2); } @@ -374,7 +374,7 @@ weechat_script_print_infobar (t_weechat_plugin *plugin, buf2 = (script->charset && script->charset[0]) ? plugin->iconv_to_internal (plugin, script->charset, buf) : NULL; - plugin->print_infobar (plugin, time_displayed, (buf2) ? buf2 : buf); + plugin->print_infobar (plugin, time_displayed, "%s", (buf2) ? buf2 : buf); if (buf2) free (buf2); } @@ -398,7 +398,7 @@ weechat_script_log (t_weechat_plugin *plugin, buf2 = (script->charset && script->charset[0]) ? plugin->iconv_to_internal (plugin, script->charset, buf) : NULL; - plugin->log (plugin, server, channel, (buf2) ? buf2 : buf); + plugin->log (plugin, server, channel, "%s", (buf2) ? buf2 : buf); if (buf2) free (buf2); }