From f35eb0f269b2e7a2cdbd8ab9e66422decbaeeaaa Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sun, 25 Oct 2009 19:15:39 -0600 Subject: Give level 99 character the GM hilight too --- src/map/clif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/clif.c b/src/map/clif.c index 7b4720c..fc91d32 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; -- cgit v1.2.3-70-g09d2 From db43fb1b34028335e2cec64bf7e7b26761f2b37d Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sun, 25 Oct 2009 19:36:15 -0600 Subject: Prevent auto bans from multiplying --- src/map/map.h | 4 ++++ src/map/pc.c | 2 ++ src/map/tmw.c | 12 +++++++++--- 3 files changed, 15 insertions(+), 3 deletions(-) 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); -- cgit v1.2.3-70-g09d2 From cd1c927516c1944001cbdd2e9816526fc6430e37 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Thu, 29 Oct 2009 17:54:00 -0600 Subject: Allow players to switch characters while alive --- src/map/clif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map/clif.c b/src/map/clif.c index fc91d32..c961464 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -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)) { -- cgit v1.2.3-70-g09d2 From d90bbe7517fd3bd51d4893cced5f20bcf314e601 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Mon, 2 Nov 2009 16:09:40 -0700 Subject: Allow deleting characters despite email --- src/char/char.c | 6 +++--- 1 file changed, 3 insertions(+), 3 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; -- cgit v1.2.3-70-g09d2