summaryrefslogtreecommitdiff
path: root/src/char_sql
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/char_sql
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/char_sql')
-rw-r--r--src/char_sql/char.c14
-rw-r--r--src/char_sql/inter.c11
-rw-r--r--src/char_sql/inter.h1
3 files changed, 0 insertions, 26 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index ee602d9d9..d15888b5d 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -117,8 +117,6 @@ int save_log = 0; //Have the logs be off by default when converting
int save_log = 1;
#endif
-//These are used to aid the map server in identifying valid clients. [Skotlex]
-static int max_account_id = DEFAULT_MAX_ACCOUNT_ID, max_char_id = DEFAULT_MAX_CHAR_ID;
static int online_check = 1; //If one, it won't let players connect when their account is already registered online and will send the relevant map server a kick user request. [Skotlex]
// Advanced subnet check [LuzZza]
@@ -221,15 +219,6 @@ void set_char_online(int map_id, int char_id, int account_id)
if ( char_id != 99 ) {
if( SQL_ERROR == Sql_Query(sql_handle, "UPDATE `%s` SET `online`='1' WHERE `char_id`='%d'", char_db, char_id) )
Sql_ShowDebug(sql_handle);
-
- if (max_account_id < account_id || max_char_id < char_id)
- { //Notify map-server of the new max IDs [Skotlex]
- if (account_id > max_account_id)
- max_account_id = account_id;
- if (char_id > max_char_id)
- max_char_id = char_id;
- mapif_send_maxid(max_account_id, max_char_id);
- }
}
character = (struct online_char_data*)idb_ensure(online_char_db, account_id, create_online_char_data);
@@ -2318,9 +2307,6 @@ int parse_frommap(int fd)
id, j, CONVIP(server[id].ip), server[id].port);
ShowStatus("Map-server %d loading complete.\n", id);
- if (max_account_id != DEFAULT_MAX_ACCOUNT_ID || max_char_id != DEFAULT_MAX_CHAR_ID)
- mapif_send_maxid(max_account_id, max_char_id); //Send the current max ids to the server to keep in sync [Skotlex]
-
// send name for wisp to player
WFIFOHEAD(fd, 3 + NAME_LENGTH);
WFIFOW(fd,0) = 0x2afb;
diff --git a/src/char_sql/inter.c b/src/char_sql/inter.c
index 00c29568b..72c88a3f2 100644
--- a/src/char_sql/inter.c
+++ b/src/char_sql/inter.c
@@ -552,17 +552,6 @@ int mapif_send_gmaccounts()
return 0;
}
-//Sends the current max account/char id to map server [Skotlex]
-void mapif_send_maxid(int account_id, int char_id)
-{
- unsigned char buf[12];
-
- WBUFW(buf,0) = 0x2b07;
- WBUFL(buf,2) = account_id;
- WBUFL(buf,6) = char_id;
- mapif_sendall(buf, 10);
-}
-
//Request to kick char from a certain map server. [Skotlex]
int mapif_disconnectplayer(int fd, int account_id, int char_id, int reason)
{
diff --git a/src/char_sql/inter.h b/src/char_sql/inter.h
index c79290c80..a44ce77e1 100644
--- a/src/char_sql/inter.h
+++ b/src/char_sql/inter.h
@@ -12,7 +12,6 @@ void inter_final(void);
int inter_parse_frommap(int fd);
int inter_mapif_init(int fd);
int mapif_send_gmaccounts(void);
-void mapif_send_maxid(int, int);
int mapif_disconnectplayer(int fd, int account_id, int char_id, int reason);
int inter_check_length(int fd,int length);