diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-03-23 15:58:36 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-03-23 15:58:36 +0000 |
commit | 994c3f6cf2e8a1a5b531340df3ab713cf176b854 (patch) | |
tree | a783e430870a99213030d6af7dc73cc0cc556f73 /src/map | |
parent | 0a3a5e636498600bda531404efabfcfea10ca150 (diff) | |
download | hercules-994c3f6cf2e8a1a5b531340df3ab713cf176b854.tar.gz hercules-994c3f6cf2e8a1a5b531340df3ab713cf176b854.tar.bz2 hercules-994c3f6cf2e8a1a5b531340df3ab713cf176b854.tar.xz hercules-994c3f6cf2e8a1a5b531340df3ab713cf176b854.zip |
- Made waiting_disconnect on the char server be an int to hold the timer ID of the timeout timer. It is now deleted when a player is successfully set offline/online.
- Corrected @unjail having the GM level check backwards.
- chrif_authok will now reject to store the newly received status data when the player it was received from is still online, should prevent losing data in certain situations.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10060 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/atcommand.c | 2 | ||||
-rw-r--r-- | src/map/chrif.c | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 232b53569..e47deeb25 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -6440,7 +6440,7 @@ int atcommand_charjailtime(const int fd, struct map_session_data* sd, const char clif_displaymessage(fd, msg_txt(3)); // Character not found. return -1; } - if (pc_isGM(pl_sd) < pc_isGM(sd)) { + if (pc_isGM(pl_sd) >= pc_isGM(sd)) { clif_displaymessage(fd, msg_txt(81)); // Your GM level don't authorize you to do this action on this player. return -1; } diff --git a/src/map/chrif.c b/src/map/chrif.c index e19f66126..403cfdcb1 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -496,7 +496,18 @@ void chrif_authreq(struct map_session_data *sd) //character selected, insert into auth db void chrif_authok(int fd) { struct auth_node *auth_data; + TBL_PC* sd; RFIFOHEAD(fd); + //Check if we don't already have player data in our server + //(prevents data that is to be saved from being overwritten by + //this received status data if this auth is later successful) [Skotlex] + if ((sd = map_id2sd(RFIFOL(fd, 4))) != NULL) + { + struct mmo_charstatus *status = (struct mmo_charstatus *)RFIFOP(fd, 20); + //Auth check is because this could be the very same sd that is waiting char-server authorization. + if (sd->state.auth && sd->status.char_id == status->char_id) + return; + } if ((auth_data =uidb_get(auth_db, RFIFOL(fd, 4))) != NULL) { //Is the character already awaiting authorization? |