Fixed Map crash when person uses global message hacks

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@394 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
wizputer 2004-11-28 00:54:09 +00:00
parent ee2816b802
commit 3ab68a0d90
2 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Date Added Date Added
11/27 11/27
* Fixed Map crash when person uses global message hacks [Wizputer]
* Fixed online system, online column works and prevent double login at the login server [Wizputer] * Fixed online system, online column works and prevent double login at the login server [Wizputer]
* Fixed some compile time errors associated with showmsg [MouseJstr] * Fixed some compile time errors associated with showmsg [MouseJstr]
* Added get_svn_revision() in core.c [MC Cameri] * Added get_svn_revision() in core.c [MC Cameri]

View File

@ -7647,8 +7647,8 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data *sd) { // S 008c <
char *buf; char *buf;
nullpo_retv(sd); nullpo_retv(sd);
if (is_charcommand(fd, sd, RFIFOP(fd,4),0)!= CharCommand_None) return;
if ((is_atcommand(fd, sd, RFIFOP(fd,4), 0) != AtCommand_None) || if ((is_atcommand(fd, sd, RFIFOP(fd,4), 0) != AtCommand_None) ||
(is_charcommand(fd, sd, RFIFOP(fd,4),0)!= CharCommand_None) ||
(sd->sc_data && (sd->sc_data &&
(sd->sc_data[SC_BERSERK].timer != -1 || //バーサーク時は会話も不可 (sd->sc_data[SC_BERSERK].timer != -1 || //バーサーク時は会話も不可
sd->sc_data[SC_NOCHAT].timer != -1 ))) //チャット禁止 sd->sc_data[SC_NOCHAT].timer != -1 ))) //チャット禁止
@ -7680,6 +7680,11 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data *sd) { // S 008c <
if (battle_config.ban_spoof_namer > 0) { if (battle_config.ban_spoof_namer > 0) {
chrif_char_ask_name(-1, sd->status.name, 2, 0, 0, 0, 0, battle_config.ban_spoof_namer, 0); // type: 2 - ban (year, month, day, hour, minute, second) chrif_char_ask_name(-1, sd->status.name, 2, 0, 0, 0, 0, battle_config.ban_spoof_namer, 0); // type: 2 - ban (year, month, day, hour, minute, second)
clif_setwaitclose(fd); // forced to disconnect because of the hack clif_setwaitclose(fd); // forced to disconnect because of the hack
if(message) free(message);
if(buf) free(buf);
return;
} }
// but for the hacker, we display on his screen (he see/look no difference). // but for the hacker, we display on his screen (he see/look no difference).
} else { } else {