]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/ipban.qc
Create separate file for deathtype declarations, move common macros to
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / ipban.qc
index fc889ecf2d0ad9e683e82e2045ab9764b0fa10d9..38a1e249d7847a954e20a9df455dd2dfa8289b67 100644 (file)
@@ -324,6 +324,7 @@ void Ban_View()
        
        print("^2Listing all existing active bans:\n");
        
+       n = 0;
        for(i = 0; i < ban_count; ++i)
        {
                if(time > ban_expire[i])
@@ -448,6 +449,15 @@ float Ban_MaybeEnforceBan(entity client)
        return FALSE;
 }
 
+.float ban_checked;
+float Ban_MaybeEnforceBanOnce(entity client)
+{
+       if(client.ban_checked)
+               return FALSE;
+       client.ban_checked = TRUE;
+       return Ban_MaybeEnforceBan(self);
+}
+
 string Ban_Enforce(float i, string reason)
 {
        string s;
@@ -466,7 +476,7 @@ string Ban_Enforce(float i, string reason)
                                        reason = strcat(reason, ", ");
                                reason = strcat(reason, e.netname);
                        }
-                       s = strcat(s, "^1NOTE:^7 banned client ", e.netname, "^7 has to go\n");
+                       s = strcat(s, "^1NOTE:^7 banned client ", e.netaddress, "^7 has to go\n");
                        dropclient(e);
                }
        bprint(s);