rcp->founder, rcp->addedby, rcp->suspendby, rcp->suspendtime,
rcp->chantype,rcp->totaljoins,rcp->tripjoins,
rcp->maxusers,rcp->tripusers,
- escwelcome,esctopic,esckey,escreason,esccomment,rcp->ltimestamp,rcp->ID);
+ escwelcome,esctopic,esckey,escreason,esccomment,(intmax_t)rcp->ltimestamp,rcp->ID);
}
void csdb_updatechannelcounters(regchan *rcp) {
void csdb_updatechanneltimestamp(regchan *rcp) {
dbquery("UPDATE chanserv.channels SET "
"lasttimestamp=%jd WHERE ID=%u",
- rcp->ltimestamp, rcp->ID);
+ (intmax_t)rcp->ltimestamp, rcp->ID);
}
void csdb_createchannel(regchan *rcp) {
rcp->founder, rcp->addedby, rcp->suspendby, rcp->suspendtime,
rcp->chantype,rcp->totaljoins,rcp->tripjoins,
rcp->maxusers,rcp->tripusers,
- escwelcome,esctopic,esckey,escreason,esccomment,rcp->ltimestamp);
+ escwelcome,esctopic,esckey,escreason,esccomment,(intmax_t)rcp->ltimestamp);
}
void csdb_deletechannel(regchan *rcp) {
escreason[0]='\0';
dbquery("INSERT INTO chanserv.maillocks (id, pattern, reason, createdby, created) VALUES(%u, '%s', '%s', %u, %jd)",
- mlp->id,escpattern,escreason,mlp->createdby,mlp->created);
+ mlp->id,escpattern,escreason,mlp->createdby,(intmax_t)mlp->created);
}
void csdb_updatemaillock(maillock *mlp) {
else
escreason[0]='\0';
- dbquery("UPDATE chanserv.maillocks SET pattern='%s', reason='%s', createdby=%u, created=%jd WHERE ID=%u", escpattern, escreason, mlp->createdby, mlp->created, mlp->id);
+ dbquery("UPDATE chanserv.maillocks SET pattern='%s', reason='%s', createdby=%u, created=%jd WHERE ID=%u", escpattern, escreason, mlp->createdby, (intmax_t)mlp->created, mlp->id);
}
/* Work out when to take the next sample */
now=getnettime();
if (now < chanstats_lastsample) {
- Error("chanstats",ERR_WARNING,"Last sample time in future (%zu > %zu)",chanstats_lastsample,now);
+ Error("chanstats",ERR_WARNING,"Last sample time in future (%jd > %jd)",(intmax_t)chanstats_lastsample,(intmax_t)now);
when=now;
} else if (now<(chanstats_lastsample+SAMPLEINTERVAL)) {
lastday=chanstats_lastsample/(24*3600);
/* Case only name change */
strncpy(np->nick,newnick,NICKLEN);
np->nick[NICKLEN]='\0';
- irc_send("%s N %s %jd",iptobase64(ipbuf, &(np->p_ipaddr), sizeof(ipbuf), 1),np->nick,np->timestamp);
+ irc_send("%s N %s %jd",iptobase64(ipbuf, &(np->p_ipaddr), sizeof(ipbuf), 1),np->nick,(intmax_t)np->timestamp);
triggerhook(HOOK_NICK_RENAME,np);
return 0;
} else {
strncpy(np->nick,newnick,NICKLEN);
np->nick[NICKLEN]='\0';
addnicktohash(np);
- irc_send("%s N %s %jd",longtonumeric(np->numeric,5),np->nick,np->timestamp);
+ irc_send("%s N %s %jd",longtonumeric(np->numeric,5),np->nick,(intmax_t)np->timestamp);
triggerhook(HOOK_NICK_RENAME,np);
return 0;
}
if (connected) {
- irc_send("%s T %s %jd %jd :%s",source,cp->index->name->content,cp->timestamp,cp->topictime,(cp->topic)?cp->topic->content:"");
+ irc_send("%s T %s %jd %jd :%s",source,cp->index->name->content,(intmax_t)cp->timestamp,(intmax_t)cp->topictime,(cp->topic)?cp->topic->content:"");
}
}
if (!IsOper(np) && !IsService(np) && !IsXOper(np)) {
nssnprintf(msgbuf, sizeof(msgbuf), localdata->reason, np);
if (np->host->clonecount <= NSMAX_GLINE_CLONES)
- irc_send("%s GL * +*@%s %u %zu :%s", mynumeric->content, IPtostr(np->p_ipaddr), localdata->duration, ti, msgbuf);
+ irc_send("%s GL * +*@%s %u %jd :%s", mynumeric->content, IPtostr(np->p_ipaddr), localdata->duration, (intmax_t)ti, msgbuf);
else
- irc_send("%s GL * +%s@%s %u %zu :%s", mynumeric->content, np->ident, IPtostr(np->p_ipaddr), localdata->duration, ti, msgbuf);
+ irc_send("%s GL * +%s@%s %u %jd :%s", mynumeric->content, np->ident, IPtostr(np->p_ipaddr), localdata->duration, (intmax_t)ti, msgbuf);
}
else
safe++;
if (!IsOper(np) && !IsService(np) && !IsXOper(np)) {
nssnprintf(msgbuf, sizeof(msgbuf), localdata->reason, np);
if (np->host->clonecount <= NSMAX_GLINE_CLONES)
- irc_send("%s GL * +*@%s %u %zu :%s", mynumeric->content, IPtostr(np->p_ipaddr), localdata->duration, ti, msgbuf);
+ irc_send("%s GL * +*@%s %u %jd :%s", mynumeric->content, IPtostr(np->p_ipaddr), localdata->duration, (intmax_t)ti, msgbuf);
else
- irc_send("%s GL * +%s@%s %u %zu :%s", mynumeric->content, np->ident, IPtostr(np->p_ipaddr), localdata->duration, ti, msgbuf);
+ irc_send("%s GL * +%s@%s %u %jd :%s", mynumeric->content, np->ident, IPtostr(np->p_ipaddr), localdata->duration, (intmax_t)ti, msgbuf);
}
else
safe++;
* match the existing timestamp, and we can bypass all the collision checking and hash fettling. */
if (np->timestamp!=timestamp) {
Error("nick",ERR_WARNING,"Rename to same nickname with different timestamp (%s(%jd) -> %s(%jd))",
- np->nick,np->timestamp,cargv[0],timestamp);
+ np->nick,(intmax_t)np->timestamp,cargv[0], (intmax_t)timestamp);
np->timestamp=timestamp;
}
strncpy(np->nick,cargv[0],NICKLEN);
}
rg_shadowserver(delay->np, delay->reason, delay->reason->type);
- irc_send("%s GL * +%s %d %zu :AUTO: %s (ID: %08lx)\r\n", mynumeric->content, hostname, rg_expiry_time, time(NULL), delay->reason->reason->content, delay->reason->glineid);
+ irc_send("%s GL * +%s %d %jd :AUTO: %s (ID: %08lx)\r\n", mynumeric->content, hostname, rg_expiry_time, (intmax_t)time(NULL), delay->reason->reason->content, delay->reason->glineid);
rg_deletedelay(delay);
}
}
rg_shadowserver(np, rp, rp->type);
- irc_send("%s GL * +%s %d %zu :AUTO: %s (ID: %08lx)\r\n", mynumeric->content, hostname, rg_expiry_time, time(NULL), rp->reason->content, rp->glineid);
+ irc_send("%s GL * +%s %d %jd :AUTO: %s (ID: %08lx)\r\n", mynumeric->content, hostname, rg_expiry_time, (intmax_t)time(NULL), rp->reason->content, rp->glineid);
return usercount;
}
if(!l->dirty)
continue;
- dbquery("UPDATE regexgline.glines SET lastseen = %zu, hits = %lu WHERE id = %d", l->lastseen, l->hitssaved, l->id);
+ dbquery("UPDATE regexgline.glines SET lastseen = %jd, hits = %lu WHERE id = %d", (intmax_t)l->lastseen, l->hitssaved, l->id);
l->dirty = 0;
}
trojanscan_database_query("INSERT INTO hits (nickname, ident, host, phrase, messagetype, glined) VALUES ('%s', '%s', '%s', %d, '%c', %d)", enick, eident, ehost, phrase->id, messagetype, glining);
trojanscan_database.glines++;
- irc_send("%s GL * +%s %d %zu :You (%s!%s@%s) are infected with a trojan (%s/%d), see %s%d for details - banned for %d hours\r\n", mynumeric->content, glinemask, glinetime * 3600, time(NULL), sender->nick, sender->ident, sender->host->name->content, worm->name->content, phrase->id, TROJANSCAN_URL_PREFIX, worm->id, glinetime);
+ irc_send("%s GL * +%s %d %jd :You (%s!%s@%s) are infected with a trojan (%s/%d), see %s%d for details - banned for %d hours\r\n", mynumeric->content, glinemask, glinetime * 3600, (intmax_t)time(NULL), sender->nick, sender->ident, sender->host->name->content, worm->name->content, phrase->id, TROJANSCAN_URL_PREFIX, worm->id, glinetime);
trojanscan_mainchanmsg("g: *!%s t: %c u: %s!%s@%s%s%s c: %d w: %s%s p: %d f: %d%s%s", glinemask, messagetype, sender->nick, sender->ident, sender->host->name->content, messagetype=='N'||messagetype=='M'||messagetype=='P'?" #: ":"", messagetype=='N'||messagetype=='M'||messagetype=='P'?chp->index->name->content:"", usercount, worm->name->content, worm->epidemic?"(E)":"", phrase->id, frequency, matchbuf[0]?" --: ":"", matchbuf[0]?matchbuf:"");
}