mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 04:32:50 -04:00
Show 'X is server owner' in /whois, allow manually turning off info/dev prefix titles by modifying server.properties
This commit is contained in:
parent
bfa1cc72b9
commit
fe68b4e695
@ -79,7 +79,9 @@ namespace MCGalaxy.Commands {
|
||||
Player.Message(p, " Player is an &9{0} Developer", Server.SoftwareName);
|
||||
if (Server.Mods.CaselessContains(who.Name.TrimEnd('+')))
|
||||
Player.Message(p, " Player is an &9{0} Moderator", Server.SoftwareName);
|
||||
|
||||
if (Server.server_owner.CaselessEq(who.Name))
|
||||
Player.Message(p, " Player is the &cServer owner");
|
||||
|
||||
if (canSeeIP) {
|
||||
string ipMsg = who.IP;
|
||||
if (Server.bannedIP.Contains(who.IP)) ipMsg = "&8" + who.IP + ", which is banned";
|
||||
|
@ -177,9 +177,10 @@ namespace MCGalaxy {
|
||||
// rank doesn't exist to begin with
|
||||
if (fileName == null || !File.Exists("ranks/" + fileName)) {
|
||||
fileName = desired + ".txt";
|
||||
// TODO: should start backwards from z to a
|
||||
} else if (MoveToFile(desired + ".txt")) {
|
||||
} else {
|
||||
// try appending a and z if duplicate
|
||||
// try appending a and z if duplicate file
|
||||
for (char c = 'a'; c <= 'z'; c++) {
|
||||
string newFile = desired + c + ".txt";
|
||||
if (MoveToFile(newFile)) return;
|
||||
|
@ -86,9 +86,11 @@ namespace MCGalaxy {
|
||||
if (game != null) game.AdjustPrefix(this, ref prefix);
|
||||
|
||||
bool isOwner = Server.server_owner.CaselessEq(name);
|
||||
bool devPrefix = Server.SoftwareStaffPrefixes;
|
||||
|
||||
string viptitle =
|
||||
isMod ? string.Format("{0}[&aInfo{0}] ", color) :
|
||||
isDev ? string.Format("{0}[&9Dev{0}] ", color) :
|
||||
(devPrefix && isMod) ? string.Format("{0}[&aInfo{0}] ", color) :
|
||||
(devPrefix && isDev) ? string.Format("{0}[&9Dev{0}] ", color) :
|
||||
isOwner ? string.Format("{0}[&cOwner{0}] ", color) : "";
|
||||
prefix = prefix + viptitle;
|
||||
prefix = (title == "") ? prefix : prefix + color + "[" + titlecolor + title + color + "] ";
|
||||
|
@ -172,6 +172,8 @@ namespace MCGalaxy {
|
||||
|
||||
[ConfigPerm("os-perbuild-default", "Other", null, LevelPermission.Nobody)]
|
||||
public static LevelPermission osPerbuildDefault = LevelPermission.Nobody;
|
||||
[ConfigBool("software-staff-prefixes", "Other", null, true)]
|
||||
public static bool SoftwareStaffPrefixes = true;
|
||||
[ConfigBool("tablist-rank-sorted", "Tablist", null, true)]
|
||||
public static bool TablistRankSorted = true;
|
||||
[ConfigBool("tablist-global", "Tablist", null, false)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user