X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/blobdiff_plain/59cd1a48e6712fb1713ce2f09326c245211df6be..7b002e5b96427a4c859acf0f51f75e0cbb453b37:/chanserv/chanservdb_updates.c diff --git a/chanserv/chanservdb_updates.c b/chanserv/chanservdb_updates.c index 3403dbe0..5c19fccf 100644 --- a/chanserv/chanservdb_updates.c +++ b/chanserv/chanservdb_updates.c @@ -92,8 +92,33 @@ void csdb_updatechannel(regchan *rcp) { escwelcome,esctopic,esckey,escreason,esccomment,(intmax_t)rcp->ltimestamp,rcp->ID); } +#define CHANNELCOUNTER_BUFSIZE 512 +#define CHANNELCOUNTER_MAX 512 + +static int channelcounter_count = 0; +static char channelcounter_bufs[CHANNELCOUNTER_MAX][CHANNELCOUNTER_BUFSIZE]; + +void csdb_flushchannelcounters(void *arg) { + int i; + + if(!channelcounter_count) + return; + + dbquery("BEGIN TRANSACTION;"); + + for(i=0;itotaljoins,rcp->tripjoins, rcp->maxusers,rcp->tripusers, rcp->ID); + + channelcounter_count++; } void csdb_updatechanneltimestamp(regchan *rcp) {