summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2007-04-25 08:41:29 +0000
committerSebastien Helleu <flashcode@flashtux.org>2007-04-25 08:41:29 +0000
commiteb2e8891cb72ac0ffd2f2f523295dedd899c2724 (patch)
tree8075f577d4699bf72ecbf75e9c5aca3a644c0fa3
parent97a3d47650de93fec6a4202e6f8d1330667d739d (diff)
downloadweechat-eb2e8891cb72ac0ffd2f2f523295dedd899c2724.zip
Fixed string format bug when displaying string thru plugin script API
-rw-r--r--ChangeLog3
-rw-r--r--src/plugins/scripts/weechat-script.c8
-rw-r--r--weechat/ChangeLog3
-rw-r--r--weechat/src/plugins/scripts/weechat-script.c8
4 files changed, 12 insertions, 10 deletions
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);
}