summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/char/char.cpp36
1 files changed, 19 insertions, 17 deletions
diff --git a/src/char/char.cpp b/src/char/char.cpp
index 071076e..6bc0007 100644
--- a/src/char/char.cpp
+++ b/src/char/char.cpp
@@ -140,8 +140,6 @@ static
int online_sorting_option = 0; // sorting option to display online players in online files
static
int online_refresh_html = 20; // refresh time (in sec) of the html file in the explorer
-static
-int online_gm_display_min_level = 20; // minimum GM level to display 'GM' when we want to display it
static
std::vector<int> online_chars; // same size of char_data, and id value of current server (or -1)
@@ -774,15 +772,23 @@ void create_online_files(void)
{
// without/with 'GM' display
int gml = isGM(cd.account_id);
- {
- if (gml >= online_gm_display_min_level)
- FPRINTF(fp, "%-24s (GM) ", cd.name);
- else
- FPRINTF(fp, "%-24s ", cd.name);
- }
+ const char *suffix = "";
+ if (gml)
+ suffix = "(special)";
+ if (gml == 1)
+ suffix = "(bot)";
+ if (gml == 40 || gml == 80)
+ suffix = "(dev)";
+ if (gml == 60)
+ suffix = "(gm)";
+ if (gml == 99)
+ suffix = "(admin)";
+
+ FPRINTF(fp, "%-24s %s", cd.name, suffix);
+
// name of the character in the html (no < >, because that create problem in html code)
FPRINTF(fp2, " <td>");
- if (gml >= online_gm_display_min_level)
+ if (*suffix)
FPRINTF(fp2, "<b>");
for (char c : cd.name.to__actual())
{
@@ -802,8 +808,10 @@ void create_online_files(void)
break;
};
}
- if (gml >= online_gm_display_min_level)
- FPRINTF(fp2, "</b> (GM)");
+
+ if (*suffix)
+ FPRINTF(fp2, "</b> %s", suffix);
+
FPRINTF(fp2, "</td>\n");
}
FPRINTF(fp, "\n");
@@ -2739,12 +2747,6 @@ int char_config_read(ZString cfgName)
{
online_sorting_option = atoi(w2.c_str());
}
- else if (w1 == "online_gm_display_min_level")
- { // minimum GM level to display 'GM' when we want to display it
- online_gm_display_min_level = atoi(w2.c_str());
- if (online_gm_display_min_level < 5) // send online file every 5 seconds to player is enough
- online_gm_display_min_level = 5;
- }
else if (w1 == "online_refresh_html")
{
online_refresh_html = atoi(w2.c_str());