LOG_TRACE("received ban list item ", ftos(i / 4), ": ip=", ip);
LOG_TRACE(" timeleft=", ftos(timeleft), " reason=", reason);
- LOG_TRACE(" serverip=", serverip, "\n");
+ LOG_TRACE(" serverip=", serverip);
timeleft -= 1.5 * autocvar_g_ban_sync_timeout;
if(timeleft < 0)
LOG_INFO("Ban list syncing: accepted ban of ", ip, " by ", serverip, " at ", uri, ": ");
LOG_INFO(reason, "\n");
-:skip
+LABEL(skip)
}
}
-void OnlineBanList_Think()
-{SELFPARAM();
+void OnlineBanList_Think(entity this)
+{
float argc;
string uri;
float i, n;
}
if(autocvar_g_ban_sync_interval > 0)
- self.nextthink = time + max(60, autocvar_g_ban_sync_interval * 60);
+ this.nextthink = time + max(60, autocvar_g_ban_sync_interval * 60);
else
goto killme;
return;
-:killme
- remove(self);
+LABEL(killme)
+ delete(this);
}
const float BAN_MAX = 256;
}
entity e = new(bansyncer);
- e.think = OnlineBanList_Think;
+ setthink(e, OnlineBanList_Think);
e.nextthink = time + 1;
}
ban_ip4 = strcat1(s); // 32
return true;
-:ipv6
+LABEL(ipv6)
i1 = strstrofs(s, ":", 0);
if(i1 < 0)
return false;
if(time + bantime > ban_expire[i])
{
ban_expire[i] = time + bantime;
- LOG_TRACE(ip, "'s ban has been prolonged to ", ftos(bantime), " seconds from now\n");
+ LOG_TRACE(ip, "'s ban has been prolonged to ", ftos(bantime), " seconds from now");
}
else
- LOG_TRACE(ip, "'s ban is still active until ", ftos(ban_expire[i] - time), " seconds from now\n");
+ LOG_TRACE(ip, "'s ban is still active until ", ftos(ban_expire[i] - time), " seconds from now");
// and enforce
reason = Ban_Enforce(i, reason);
}
// okay, insert our new victim as i
Ban_Delete(i);
- LOG_TRACE(ip, " has been banned for ", ftos(bantime), " seconds\n");
+ LOG_TRACE(ip, " has been banned for ", ftos(bantime), " seconds");
ban_expire[i] = time + bantime;
ban_ip[i] = strzone(ip);
ban_count = max(ban_count, i + 1);