summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-08-26 13:23:56 +0200
committerSebastien Helleu <flashcode@flashtux.org>2011-08-26 13:23:56 +0200
commit832a089d3d60c9de73dbc669aeea4c5044d5a3bf (patch)
tree7307378d299daa7794d6c0770d590ade6f71410e /src/plugins
parentd040fe1b88f8d2a781b2fd051c367d5753a0d43b (diff)
downloadweechat-832a089d3d60c9de73dbc669aeea4c5044d5a3bf.zip
irc: add "count" in hashtable returned by "irc_message_split"
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/irc/irc-info.c4
-rw-r--r--src/plugins/irc/irc-message.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/irc/irc-info.c b/src/plugins/irc/irc-info.c
index 0cad62129..262b9f3b8 100644
--- a/src/plugins/irc/irc-info.c
+++ b/src/plugins/irc/irc-info.c
@@ -618,7 +618,9 @@ irc_info_init ()
/* TRANSLATORS: please do not translate key names (enclosed by quotes) */
N_("\"msg1\" ... \"msgN\": messages to send "
"(without final \"\\r\\n\"), "
- "\"args1\" ... \"argsN\": arguments of messages"),
+ "\"args1\" ... \"argsN\": arguments of "
+ "messages, "
+ "\"count\": number of messages"),
&irc_info_get_info_hashtable_cb, NULL);
/* infolist hooks */
diff --git a/src/plugins/irc/irc-message.c b/src/plugins/irc/irc-message.c
index cc6586ba0..4a1ba8cd3 100644
--- a/src/plugins/irc/irc-message.c
+++ b/src/plugins/irc/irc-message.c
@@ -347,8 +347,8 @@ void
irc_message_split_add (struct t_hashtable *hashtable, int number,
const char *message, const char *arguments)
{
- char key[32];
-
+ char key[32], value[32];
+
if (message)
{
snprintf (key, sizeof (key), "msg%d", number);
@@ -372,6 +372,8 @@ irc_message_split_add (struct t_hashtable *hashtable, int number,
key, arguments);
}
}
+ snprintf (value, sizeof (value), "%d", number);
+ weechat_hashtable_set (hashtable, "count", value);
}
/*