From 5e6e3de553b044670368720b421349c0c6e4a6b1 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Fri, 26 Aug 2011 13:37:59 +0200 Subject: irc: return "count" in hashtable built by irc_server_sendf --- src/plugins/irc/irc-server.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/plugins/irc') diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index fed0b122d..19cf92937 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -1749,7 +1749,7 @@ struct t_hashtable * irc_server_sendf (struct t_irc_server *server, int flags, const char *tags, const char *format, ...) { - char **items, hash_key[32]; + char **items, hash_key[32], value[32]; const char *str_message, *str_args; int i, items_count, number, ret_number, rc; struct t_hashtable *hashtable, *ret_hashtable; @@ -1807,6 +1807,11 @@ irc_server_sendf (struct t_irc_server *server, int flags, const char *tags, } number++; } + if (ret_hashtable) + { + snprintf (value, sizeof (value), "%d", ret_number - 1); + weechat_hashtable_set (ret_hashtable, "count", value); + } weechat_hashtable_free (hashtable); if (!rc) break; -- cgit v1.2.3