snprintf(mask, sizeof(mask), "*@%s", IPtostr(target->p_ipaddr));
}
- irc_send("%s GL * +%s %d :%s", mynumeric->content, mask, duration, reason);
+ irc_send("%s GL * +%s %d %jd :%s", mynumeric->content, mask, duration, (intmax_t)time(NULL), reason);
LUA_RETURN(ps, lua_cmsg(LUA_PUKECHAN, "lua-GLINE: %s (%d users, %d seconds -- %s)", mask, usercount, duration, reason));
}
}
}
+static int ignorable_nick(nick *np) {
+ if(IsOper(np) || IsService(np) || IsXOper(np) || SIsService(&serverlist[homeserver(np->numeric)]))
+ return 1;
+ return 0;
+}
+
void rg_checkexpiry(void *arg) {
struct rg_struct *rp = rg_list, *lp = NULL;
time_t current = time(NULL);
hostlen = RGBuildHostname(hostname, np);
- if(IsOper(np) || IsService(np) || IsXOper(np))
+ if(ignorable_nick(np))
return;
for(rp=rg_list;rp;rp=rp->next) {
for(j=0;j<NICKHASHSIZE;j++) {
for(tnp=nicktable[j];tnp;tnp=tnp->next) {
- if(IsOper(tnp) || IsService(tnp) || IsXOper(tnp))
+ if(ignorable_nick(tnp))
continue;
hostlen = RGBuildHostname(hostname, tnp);
for(j=0;j<NICKHASHSIZE;j++) {
for(np=nicktable[j];np;np=np->next) {
- if(IsOper(np) || IsService(np) || IsXOper(np))
+ if(ignorable_nick(np))
continue;
hostlen = RGBuildHostname(hostname, np);
for(rp=rg_list;rp;rp=rp->next) {
trojanscan_database.glines = 0;
trojanscan_database.detections = 0;
- dbhost = getcopyconfigitem("trojanscan", "dbhost", "localhost", HOSTLEN);
- dbuser = getcopyconfigitem("trojanscan", "dbuser", "", NICKLEN);
- dbpass = getcopyconfigitem("trojanscan", "dbpass", "", REALLEN);
- db = getcopyconfigitem("trojanscan", "db", "", NICKLEN);
+ dbhost = getcopyconfigitem("trojanscan", "dbhost", "localhost", 100);
+ dbuser = getcopyconfigitem("trojanscan", "dbuser", "moo", 100);
+ dbpass = getcopyconfigitem("trojanscan", "dbpass", "changeme", 100);
+ db = getcopyconfigitem("trojanscan", "db", "moo", 100);
- dbport = getcopyconfigitem("trojanscan", "dbport", "3306", ACCOUNTLEN);
+ dbport = getcopyconfigitem("trojanscan", "dbport", "3306", 10);
length = snprintf(buf, sizeof(buf) - 1, "%d", TROJANSCAN_DEFAULT_MAXCHANS);
temp = getcopyconfigitem("trojanscan", "maxchans", buf, length);