distinguish auto-banned clients from vote-banned clients

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7307 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lucas GAUTHERON
2013-03-05 12:37:49 +00:00
parent 0d2521cd18
commit c7b1fa19c2
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ enum { HE_COMBO, HE_COMBO2, HE_COMBO3, HE_COMBO4, HE_COMBO5, HE_TEAMWORK, HE_FLA
#define DVELF 4.0f
enum { DISC_NONE = 0, DISC_EOP, DISC_CN, DISC_MKICK, DISC_MBAN, DISC_TAGT, DISC_BANREFUSE, DISC_WRONGPW, DISC_SOPLOGINFAIL, DISC_MAXCLIENTS, DISC_MASTERMODE, DISC_AUTOKICK, DISC_AUTOBAN, DISC_DUP, DISC_BADNICK, DISC_OVERFLOW, DISC_ABUSE, DISC_AFK, DISC_FFIRE, DISC_CHEAT, DISC_NUM };
enum { BAN_NONE = 0, BAN_VOTE, BAN_BLACKLIST, BAN_MASTER };
enum { BAN_NONE = 0, BAN_VOTE, BAN_AUTO, BAN_BLACKLIST, BAN_MASTER };
#define EXT_ACK -1
#define EXT_VERSION 104
+3 -3
View File
@@ -2037,10 +2037,10 @@ void addgban(const char *name)
}
}
void addban(client *cl, int reason)
inline void addban(client *cl, int reason, int type)
{
if(!cl) return;
ban b = { cl->peer->address, servmillis+scl.ban_time };
ban b = { cl->peer->address, servmillis+scl.ban_time, type };
bans.add(b);
disconnect_client(cl->clientnum, reason);
}
@@ -2056,7 +2056,7 @@ int getbantype(int cn)
{
ban &b = bans[i];
if(b.millis < servmillis) { bans.remove(i--); }
if(b.address.host == c.peer->address.host) { return BAN_VOTE; }
if(b.address.host == c.peer->address.host) return b.type;
}
return BAN_NONE;
}
+1 -1
View File
@@ -355,7 +355,7 @@ struct client // server side version of "dynent" type
struct ban
{
ENetAddress address;
int millis;
int millis, type;
};
struct worldstate
+1 -1
View File
@@ -23,7 +23,7 @@ inline void checkclientpos(client *cl)
#define POW2XY(A,B) (pow2(A.x-B.x)+pow2(A.y-B.y))
extern void addban(client *cl, int reason);
extern inline void addban(client *cl, int reason, int type = BAN_AUTO);
#ifdef ACAC
#include "anticheat.h"