diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-08-01 10:35:43 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-08-01 10:35:43 +0000 |
commit | d7de822625456e6d6c6ac544eeee072e3d9c0745 (patch) | |
tree | 4fa988e2b75e3fa1fe98ea31c3ddaab4cd170766 /src | |
parent | a50c6281bbad73cd4155cbf55af4c899c9e2d1ea (diff) | |
download | hercules-d7de822625456e6d6c6ac544eeee072e3d9c0745.tar.gz hercules-d7de822625456e6d6c6ac544eeee072e3d9c0745.tar.bz2 hercules-d7de822625456e6d6c6ac544eeee072e3d9c0745.tar.xz hercules-d7de822625456e6d6c6ac544eeee072e3d9c0745.zip |
Disabled the gm-hide namerequest cheat detection, uncomment if you know what you're doing.
Related revisions: r5813, r6709, r6715, r9905.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13031 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/clif.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 66e094f5f..491909114 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7160,7 +7160,7 @@ int clif_charnameack (int fd, struct block_list *bl) // break; return 0; default: - ShowError("clif_parse_GetCharNameRequest : bad type %d(%d)\n", bl->type, bl->id); + ShowError("clif_charnameack: bad type %d(%d)\n", bl->type, bl->id); return 0; } @@ -8120,40 +8120,37 @@ void clif_parse_QuitGame(int fd, struct map_session_data *sd) WFIFOSET(fd,packet_len(0x18b)); } -/*========================================== - * - *------------------------------------------*/ +/// Requesting unit's name +/// S 0094 <object id>.l void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) { - int account_id; + int id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); struct block_list* bl; struct status_change *sc; - account_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); + if( id < 0 && -id == sd->bl.id ) // for disguises [Valaris] + id = sd->bl.id; - if(account_id<0 && -account_id == sd->bl.id) // for disguises [Valaris] - account_id= sd->bl.id; - - bl = map_id2bl(account_id); - //Is this possible? Lagged clients could request names of already gone mobs/players. [Skotlex] - if (!bl) return; + bl = map_id2bl(id); + if( bl == NULL ) + return; // Lagged clients could request names of already gone mobs/players. [Skotlex] + // 'see people in GM hide' cheat detection + /* disabled due to false positives (network lag + request name of char that's about to hide = race condition) sc = status_get_sc(bl); if (sc && sc->option&OPTION_INVISIBLE && !disguised(bl) && bl->type != BL_NPC && //Skip hidden NPCs which can be seen using Maya Purple pc_isGM(sd) < battle_config.hack_info_GM_level ) { - //GM characters (with client side GM enabled are able to see invisible stuff) [Lance] - //Asked name of invisible player, this shouldn't be possible! - //Possible bot? Thanks to veider and qspirit - //FIXME: Still isn't perfected as clients keep asking for this on legitimate situations. char gm_msg[256]; - sprintf(gm_msg, "Hack on NameRequest: character '%s' (account: %d) requested the name of an invisible target.\n", sd->status.name, sd->status.account_id); + sprintf(gm_msg, "Hack on NameRequest: character '%s' (account: %d) requested the name of an invisible target (id: %d).\n", sd->status.name, sd->status.account_id, id); ShowWarning(gm_msg); - // information is sended to all online GM + // information is sent to all online GMs intif_wis_message_to_gm(wisp_server_name, battle_config.hack_info_GM_level, gm_msg); return; } + */ + clif_charnameack(fd, bl); } |