rathena / rathena

rAthena is an open-source cross-platform MMORPG server.
https://rathena.org/board/
GNU General Public License v3.0
2.86k stars 2.29k forks source link

clif_parse_GMReqAccountName (CZ_REQ_ACCOUNTNAME) usage? #123

Closed cydh closed 9 years ago

cydh commented 9 years ago

0x01df,6,gmreqaccname,2 clif.c::clif_parse_GMReqAccountName CZ_REQ_ACCOUNTNAME

what does it do? also with the clif_account_name (ZC_ACK_ACCOUNTNAME)?

Can we just disable it?

but, by disabling it doesn't solve the issue, since client still keep going to spam the packet. xD well, CMIIW

anacondaq commented 9 years ago

Links to Tracker & Bugs posted on forum.... http://rathena.org/board/tracker/issue-9186-infinite-account-info-spam-for-2010-07-30/ http://rathena.org/board/topic/98224-non-stop-account-info/ http://rathena.org/board/topic/94135-infinite-accinfo-on-charcters/ And many others reports about this bug.

I've show a commit in bugtracker AFTER what this problem is start to happened. https://github.com/rathena/rathena/commit/c9532369cb3a67096ad819a13cfaae5fa0cd96a2

The problem was in these lines and in this function: https://github.com/rathena/rathena/blob/master/src/map/clif.c#L13307-L13316

Before changes, this problem was fixed very easly. I was uncomment commeted earlier a line: clif_account_name(sd, account_id, ""); //! TODO request to login-serv

So, my functions like: (i'm not updated to latest yet)

/// GM requesting account name (for right-click gm menu) (CZ_REQ_ACCOUNTNAME).
/// 01df <account id>.L
void clif_parse_GMReqAccountName(int fd, struct map_session_data *sd)
{
    if (sd->bl.type&BL_PC) { // Only show for players
        char command[30];
        int account_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]);

        //tmp get all display
        safesnprintf(command,sizeof(command),"%caccinfo %d", atcommand_symbol, account_id);
        is_atcommand(fd, sd, command, 1);
        clif_account_name(sd, account_id, ""); //! TODO request to login-serv
    }
}

And i have NO SPAM at all. Thank's

lighta commented 9 years ago

Ye actually sending clif_account_name(sd, account_id, ""); is quite the sameas disable the packet imo. From what I remenber that command was misinterpreted with the full_strip one. The usage of it it's very limited so I think it'd be better if we remove it, we could keed the diff as a note is someone is interested of having it but I don't found it that usefull to keep it.

Otherwise to make thing easier we could writte the acc_name into mmo_charstatus struct so it will be available easier. Instead reasking everytime.

anacondaq commented 9 years ago

i dunno what you need more. Really. In post above i did sent all information what need to make it reproduce. Please, dear lighta, take attention to game exe, this problem happened 100% to 2010-07-30.

Btw, for the current day, this problem is solved by some commit from cydh, he did remove this from right button action. (i forgot a commit about this)