summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-11 09:31:32 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-11 09:31:32 +0000
commit044ca381f50daa43b09fad43c9a671c276fc2f2f (patch)
tree77a59efa67e8a5c4375f8f8a1165fe3e37beb5bb /src/map/clif.c
parent222c9602a0802e12810af0bdbc09a186154f8b96 (diff)
downloadhercules-044ca381f50daa43b09fad43c9a671c276fc2f2f.tar.gz
hercules-044ca381f50daa43b09fad43c9a671c276fc2f2f.tar.bz2
hercules-044ca381f50daa43b09fad43c9a671c276fc2f2f.tar.xz
hercules-044ca381f50daa43b09fad43c9a671c276fc2f2f.zip
The max_account_id packetver detection mechanism will never cause any connection problems ever again. (bugreport:388)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12563 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 01417b2dd..ea2a10b4c 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -92,11 +92,6 @@ static uint32 bind_ip = INADDR_ANY;
static uint16 map_port = 5121;
int map_fd;
-//These two will be used to verify the incoming player's validity.
-//It helps identify their client packet version correctly. [Skotlex]
-static int max_account_id = DEFAULT_MAX_ACCOUNT_ID;
-static int max_char_id = DEFAULT_MAX_CHAR_ID;
-
int clif_parse (int fd);
/*==========================================
@@ -541,15 +536,6 @@ int clif_authfail_fd(int fd, int type)
}
/*==========================================
- * Used to know which is the max valid account/char id [Skotlex]
- *------------------------------------------*/
-void clif_updatemaxid(int account_id, int char_id)
-{
- max_account_id = account_id;
- max_char_id = char_id;
-}
-
-/*==========================================
*
*------------------------------------------*/
int clif_charselectok(int id)
@@ -7617,9 +7603,9 @@ static int clif_guess_PacketVer(int fd, int get_previous, int *error)
#define CHECK_PACKET_VER() \
if( cmd != clif_config.connect_cmd[packet_ver] || packet_len != packet_db[packet_ver][cmd].len )\
;/* not wanttoconnection or wrong length */\
- else if( (value=(int)RFIFOL(fd, packet_db[packet_ver][cmd].pos[0])) < START_ACCOUNT_NUM || value > max_account_id )\
+ else if( (value=(int)RFIFOL(fd, packet_db[packet_ver][cmd].pos[0])) < START_ACCOUNT_NUM || value > END_ACCOUNT_NUM )\
{ SET_ERROR(2); }/* invalid account_id */\
- else if( (value=(int)RFIFOL(fd, packet_db[packet_ver][cmd].pos[1])) <= 0 || value > max_char_id )\
+ else if( (value=(int)RFIFOL(fd, packet_db[packet_ver][cmd].pos[1])) <= 0 )\
{ SET_ERROR(3); }/* invalid char_id */\
/* RFIFOL(fd, packet_db[packet_ver][cmd].pos[2]) - don't care about login_id1 */\
/* RFIFOL(fd, packet_db[packet_ver][cmd].pos[3]) - don't care about client_tick */\