From 6ec613787a7c28d744e106955c9746a3571f1a8b Mon Sep 17 00:00:00 2001 From: gumi Date: Fri, 16 Feb 2018 23:12:30 -0500 Subject: hide from the online list any GM level that is not a multiple of 10 and not 99 --- src/char/char.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/char/char.cpp b/src/char/char.cpp index 47fbba2..18fda91 100644 --- a/src/char/char.cpp +++ b/src/char/char.cpp @@ -822,14 +822,16 @@ void create_online_files(void) // without/with 'GM' display GmLevel gml = isGM(cd.key.account_id); { - if (gml.satisfies(char_conf.online_gm_display_min_level)) + if ((gml.satisfies(char_conf.online_gm_display_min_level) && + !(gml.get_all_bits() % 10)) || gml.satisfies(GmLevel::from(99_u32))) FPRINTF(fp, "%-24s (GM) "_fmt, cd.key.name); else FPRINTF(fp, "%-24s "_fmt, cd.key.name); } // name of the character in the html (no < >, because that create problem in html code) FPRINTF(fp2, " "_fmt); - if (gml.satisfies(char_conf.online_gm_display_min_level)) + if ((gml.satisfies(char_conf.online_gm_display_min_level) && + !(gml.get_all_bits() % 10)) || gml.satisfies(GmLevel::from(99_u32))) FPRINTF(fp2, ""_fmt); for (char c : cd.key.name.to__actual()) { @@ -849,7 +851,8 @@ void create_online_files(void) break; }; } - if (gml.satisfies(char_conf.online_gm_display_min_level)) + if ((gml.satisfies(char_conf.online_gm_display_min_level) && + !(gml.get_all_bits() % 10)) || gml.satisfies(GmLevel::from(99_u32))) FPRINTF(fp2, " (GM)"_fmt); FPRINTF(fp2, "\n"_fmt); } -- cgit v1.2.3-60-g2f50