summaryrefslogtreecommitdiff
path: root/src/plugins/irc
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-08-26 13:37:59 +0200
committerSebastien Helleu <flashcode@flashtux.org>2011-08-26 13:37:59 +0200
commit5e6e3de553b044670368720b421349c0c6e4a6b1 (patch)
treeee13c60de837fd63dcf6774d67566b94692727a0 /src/plugins/irc
parent832a089d3d60c9de73dbc669aeea4c5044d5a3bf (diff)
downloadweechat-5e6e3de553b044670368720b421349c0c6e4a6b1.zip
irc: return "count" in hashtable built by irc_server_sendf
Diffstat (limited to 'src/plugins/irc')
-rw-r--r--src/plugins/irc/irc-server.c7
1 files changed, 6 insertions, 1 deletions
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;