diff options
-rw-r--r-- | src/char/char.c | 6 | ||||
-rw-r--r-- | src/map/clif.c | 6 | ||||
-rw-r--r-- | src/map/map.h | 4 | ||||
-rw-r--r-- | src/map/pc.c | 2 | ||||
-rw-r--r-- | src/map/tmw.c | 12 |
5 files changed, 21 insertions, 9 deletions
diff --git a/src/char/char.c b/src/char/char.c index c60305b..c632d1b 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -2778,12 +2778,12 @@ int parse_char(int fd) { // otherwise, we delete the character } else { - if (strcmpi(email, sd->email) != 0) { // if it's an invalid email + /*if (strcmpi(email, sd->email) != 0) { // if it's an invalid email WFIFOW(fd, 0) = 0x70; WFIFOB(fd, 2) = 0; // 00 = Incorrect Email address WFIFOSET(fd, 3); // if mail is correct - } else { + } else {*/ for (i = 0; i < 9; i++) { struct mmo_charstatus *cs = NULL; if (sd->found_char[i] >= 0 && (cs = &char_dat[sd->found_char[i]])->char_id == RFIFOL(fd,2)) { @@ -2825,7 +2825,7 @@ int parse_char(int fd) { WFIFOB(fd,2) = 0; WFIFOSET(fd,3); } - } + //} RFIFOSKIP(fd,46); } break; diff --git a/src/map/clif.c b/src/map/clif.c index 7b4720c..c961464 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -777,7 +777,7 @@ static int clif_set0078(struct map_session_data *sd, unsigned char *buf) { WBUFB(buf,45)=sd->sex; WBUFPOS(buf,46,sd->bl.x,sd->bl.y); WBUFB(buf,48)|=sd->dir&0x0f; - WBUFW(buf,49)=pc_isGM(sd) == 60 ? 0x80 : 0; + WBUFW(buf,49)=(pc_isGM(sd) == 60 || pc_isGM(sd) == 99) ? 0x80 : 0; WBUFB(buf,51)=sd->state.dead_sit; WBUFW(buf,52)=((level = battle_get_lv(&sd->bl)) > battle_config.max_lv) ? battle_config.max_lv : level; @@ -6742,8 +6742,8 @@ void clif_parse_Restart(int fd, struct map_session_data *sd) { } break; case 0x01: - if(!pc_isdead(sd) && (sd->opt1 || (sd->opt2 && !(night_flag == 1 && sd->opt2 == STATE_BLIND)))) - return; + /*if(!pc_isdead(sd) && (sd->opt1 || (sd->opt2 && !(night_flag == 1 && sd->opt2 == STATE_BLIND)))) + return;*/ /* Rovert's Prevent logout option - Fixed [Valaris] */ if ((battle_config.prevent_logout && (gettick() - sd->canlog_tick) >= 10000) || (!battle_config.prevent_logout)) { diff --git a/src/map/map.h b/src/map/map.h index 9a6b3ef..c0a9772 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -358,6 +358,10 @@ struct map_session_data { int ignoreAll; short sg_count; + struct { + unsigned in_progress : 1; + } auto_ban_info; + time_t chat_reset_due; time_t chat_repeat_reset_due; int chat_lines_in; diff --git a/src/map/pc.c b/src/map/pc.c index 0b251cc..75ae42c 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -841,6 +841,8 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, short tmw_versio } } + sd->auto_ban_info.in_progress = 0; + // Initialize antispam vars sd->chat_reset_due = sd->chat_lines_in = sd->chat_total_repeats = sd->chat_repeat_reset_due = 0; sd->chat_lastmsg[0] = '\0'; diff --git a/src/map/tmw.c b/src/map/tmw.c index 25aa55b..a19eb26 100644 --- a/src/map/tmw.c +++ b/src/map/tmw.c @@ -68,10 +68,12 @@ int tmw_CheckChatSpam(struct map_session_data *sd, char* message) { if (sd->chat_lines_in >= battle_config.chat_spam_flood || sd->chat_total_repeats >= battle_config.chat_spam_flood) { sd->chat_lines_in = sd->chat_total_repeats = 0; - if (battle_config.chat_spam_ban > 0) { + if (battle_config.chat_spam_ban > 0 && !sd->auto_ban_info.in_progress) { tmw_GmHackMsg("%s has been autobanned for chat spam", sd->status.name); gm_log("server(0,0) Server : @autoban %s %dh (chat spam)", sd->status.name, battle_config.chat_spam_ban); + sd->auto_ban_info.in_progress = 1; + clif_displaymessage(sd->fd, "You have been banned for spamming. Please do not spam."); chrif_char_ask_name(-1, sd->status.name, 2, 0, 0, 0, battle_config.chat_spam_ban, 0, 0); // type: 2 - ban (year, month, day, hour, minute, second) clif_setwaitclose(sd->fd); @@ -146,10 +148,12 @@ int tmw_CheckTradeSpam(struct map_session_data *sd) { if (sd->trades_in >= battle_config.trade_spam_flood) { sd->trades_in = 0; - if (battle_config.trade_spam_ban > 0) { + if (battle_config.trade_spam_ban > 0 && !sd->auto_ban_info.in_progress) { tmw_GmHackMsg("%s has been autobanned for trade spam", sd->status.name); gm_log("server(0,0) Server : @autoban %s %dh (trade spam)", sd->status.name, battle_config.trade_spam_ban); + sd->auto_ban_info.in_progress = 1; + clif_displaymessage(sd->fd, "You have been banned for trade spamming. Please do not trade spam."); chrif_char_ask_name(-1, sd->status.name, 2, 0, 0, 0, battle_config.trade_spam_ban, 0, 0); // type: 2 - ban (year, month, day, hour, minute, second) clif_setwaitclose(sd->fd); @@ -181,10 +185,12 @@ int tmw_CheckSitSpam(struct map_session_data *sd) { if (sd->sits_in >= battle_config.sit_spam_flood) { sd->sits_in = 0; - if (battle_config.sit_spam_ban > 0) { + if (battle_config.sit_spam_ban > 0 && !sd->auto_ban_info.in_progress) { tmw_GmHackMsg("%s has been autobanned for sit spam", sd->status.name); gm_log("server(0,0) Server : @autoban %s %dh (sit spam)", sd->status.name, battle_config.sit_spam_ban); + sd->auto_ban_info.in_progress = 1; + clif_displaymessage(sd->fd, "You have been banned for sit spamming. Please do not sit spam."); chrif_char_ask_name(-1, sd->status.name, 2, 0, 0, 0, battle_config.sit_spam_ban, 0, 0); // type: 2 - ban (year, month, day, hour, minute, second) clif_setwaitclose(sd->fd); |