diff options
author | shennetsind <ind@henn.et> | 2013-11-18 20:42:28 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-11-18 20:42:28 -0200 |
commit | ea7dd2157c6d92eb42da567032578ad47e790a8e (patch) | |
tree | 8a403564d745d2b36591c94c4b54d86755ecbfdb /src/map | |
parent | fbf2cb2d341e7fbca38291583ac56c7a98989500 (diff) | |
download | hercules-ea7dd2157c6d92eb42da567032578ad47e790a8e.tar.gz hercules-ea7dd2157c6d92eb42da567032578ad47e790a8e.tar.bz2 hercules-ea7dd2157c6d92eb42da567032578ad47e790a8e.tar.xz hercules-ea7dd2157c6d92eb42da567032578ad47e790a8e.zip |
Modified charban char server responding action
so that the char id is used instead of account id, thus not disconnecting the account id from map server unless the char id being banned is online, special thanks to haruna.
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/chrif.c | 20 | ||||
-rw-r--r-- | src/map/chrif.h | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c index 56572d492..8e6034ef2 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -966,21 +966,21 @@ int chrif_deadopt(int father_id, int mother_id, int child_id) { } /*========================================== - * Disconnection of a player (account has been banned of has a status, from login-server) by [Yor] + * Disconnection of a player (account or char has been banned of has a status, from login or char server) by [Yor] *------------------------------------------*/ -int chrif_accountban(int fd) { - int acc; +int chrif_idbanned(int fd) { + int id; struct map_session_data *sd; - acc = RFIFOL(fd,2); + id = RFIFOL(fd,2); if ( battle_config.etc_log ) - ShowNotice("chrif_accountban %d.\n", acc); + ShowNotice("chrif_idbanned %d.\n", id); - sd = map->id2sd(acc); + sd = ( RFIFOB(fd,6) == 2 ) ? map->charid2sd(id) : map->id2sd(id); - if ( acc < 0 || sd == NULL ) { - ShowError("chrif_accountban failed - player not online.\n"); + if ( id < 0 || sd == NULL ) {/* ?___? is this worth showing a error for? you might wanna ban a player that is not online, this is not a error and the operation is still valid */ + ShowError("chrif_idbanned failed - player not online.\n"); return 0; } @@ -1453,7 +1453,7 @@ int chrif_parse(int fd) { case 0x2b0d: chrif->changedsex(fd); break; case 0x2b0f: chrif->char_ask_name_answer(RFIFOL(fd,2), (char*)RFIFOP(fd,6), RFIFOW(fd,30), RFIFOW(fd,32)); break; case 0x2b12: chrif->divorceack(RFIFOL(fd,2), RFIFOL(fd,6)); break; - case 0x2b14: chrif->accountban(fd); break; + case 0x2b14: chrif->idbanned(fd); break; case 0x2b1b: chrif->recvfamelist(fd); break; case 0x2b1d: chrif->load_scdata(fd); break; case 0x2b1e: chrif->update_ip(fd); break; @@ -1748,7 +1748,7 @@ void chrif_defaults(void) { chrif->changemapserverack = chrif_changemapserverack; chrif->changedsex = chrif_changedsex; chrif->divorceack = chrif_divorceack; - chrif->accountban = chrif_accountban; + chrif->idbanned = chrif_idbanned; chrif->recvfamelist = chrif_recvfamelist; chrif->load_scdata = chrif_load_scdata; chrif->update_ip = chrif_update_ip; diff --git a/src/map/chrif.h b/src/map/chrif.h index 56aa569a3..b69d34210 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -127,7 +127,7 @@ struct chrif_interface { int (*changemapserverack) (int account_id, int login_id1, int login_id2, int char_id, short map_index, short x, short y, uint32 ip, uint16 port); int (*changedsex) (int fd); int (*divorceack) (int char_id, int partner_id); - int (*accountban) (int fd); + int (*idbanned) (int fd); int (*recvfamelist) (int fd); int (*load_scdata) (int fd); void (*update_ip) (int fd); |