public static void MiscLine(Player p, string name, int deaths, int money) { if (Economy.Enabled) { p.Message(" &a{0} &cdeaths&S, &a{2} &S{3}, {1} &Sawards", deaths, Awards.AwardAmount(name), money, Server.Config.Currency); } else { p.Message(" &a{0} &cdeaths&S, {1} &Sawards", deaths, Awards.AwardAmount(name)); } }
internal static void MiscLine(Player p, string name, int deaths, int money) { if (Economy.Enabled) { Player.Message(p, " &a{0} &cdeaths%S, &a{2} %S{3}, {1} %Sawards", deaths, Awards.AwardAmount(name), money, ServerConfig.Currency); } else { Player.Message(p, " &a{0} &cdeaths%S, {1} %Sawards", deaths, Awards.AwardAmount(name)); } }
public override void Use(Player p, string message) { if (message == "") { Help(p); return; } int matches; Player pl = PlayerInfo.FindOrShowMatches(p, message, out matches); if (matches > 1) { return; } if (matches == 1) { Player.SendMessage(p, pl.color + pl.name + " %Sis online, using /whois instead."); Command.all.Find("whois").Use(p, message); return; } if (!Player.ValidName(message)) { Player.SendMessage(p, "\"" + message + "\" is not a valid player name."); return; } OfflinePlayer target = PlayerInfo.FindOffline(message, true); string plGroup = Group.findPlayer(message.ToLower()); Group group = Group.Find(plGroup); if (target == null) { Player.SendMessage(p, group.color + message + " %Shas the rank of " + group.color + plGroup); return; } string color = target.color == "" ? group.color : target.color; string prefix = target.title == "" ? "" : "[" + target.titleColor + target.title + color + "] "; Player.SendMessage(p, color + prefix + target.name + " %Shas :"); Player.SendMessage(p, "> > the rank of " + group.color + plGroup); if (Economy.Enabled) { Player.SendMessage(p, "> > &a" + target.money + " %S" + Server.moneys); } Player.SendMessage(p, "> > &cdied &a" + target.deaths + " %Stimes"); Player.SendMessage(p, "> > &bmodified &a" + target.blocks + " &eblocks."); Player.SendMessage(p, "> > was last seen on &a" + target.lastLogin); Player.SendMessage(p, "> > " + TotalTime(target.totalTime)); Player.SendMessage(p, "> > first logged into the server on &a" + target.firstLogin); Player.SendMessage(p, "> > logged in &a" + target.logins + " %Stimes, &c" + target.kicks + " %Sof which ended in a kick."); Player.SendMessage(p, "> > " + Awards.AwardAmount(message) + " awards"); string[] data = Ban.GetBanData(message); if (data != null) { Player.SendMessage(p, "> > was banned by " + data[0] + " for " + data[1] + " on " + data[2]); } if (Server.Devs.ContainsInsensitive(message)) { Player.SendMessage(p, "> > Player is a &9Developer"); } else if (Server.Mods.ContainsInsensitive(message)) { Player.SendMessage(p, "> > Player is a &9MCGalaxy Moderator"); } if (!CheckAdditionalPerm(p)) { return; } if (Server.bannedIP.Contains(target.ip)) { target.ip = "&8" + target.ip + ", which is banned"; } Player.SendMessage(p, "> > the IP of " + target.ip); if (Server.useWhitelist && Server.whiteList.Contains(message)) { Player.SendMessage(p, "> > Player is &fWhitelisted"); } }
public override void Use(Player p, string message) { Player who = message == "" ? p : PlayerInfo.Find(message); if (message == "") { message = p.name; } if (who == null || !Entities.CanSee(p, who)) { Player.SendMessage(p, "\"" + message + "\" is offline! Using /whowas instead."); Command.all.Find("whowas").Use(p, message); return; } Player.SendMessage(p, who.color + who.name + " %S(" + who.DisplayName + ") %Sis on &b" + who.level.name); Player.SendMessage(p, who.FullName + " %Shas :"); Player.SendMessage(p, "> > the rank of " + who.group.color + who.group.name); if (Economy.Enabled) { Player.SendMessage(p, "> > &a" + who.money + " %S" + Server.moneys); } Player.SendMessage(p, "> > &cdied &a" + who.overallDeath + Server.DefaultColor + " times"); Player.SendMessage(p, "> > &bmodified &a" + who.overallBlocks + " &eblocks &eand &a" + who.loginBlocks + " &ewere changed &9since logging in&e."); string storedTime = Convert.ToDateTime(DateTime.Now.Subtract(who.timeLogged).ToString()).ToString("HH:mm:ss"); TimeSpan time = who.time; Player.SendMessage(p, "> > time spent on server: " + time.Days + " Days, " + time.Hours + " Hours, " + time.Minutes + " Minutes, " + time.Seconds + " Seconds."); Player.SendMessage(p, "> > been logged in for &a" + storedTime); Player.SendMessage(p, "> > first logged into the server on &a" + who.firstLogin.ToString("yyyy-MM-dd") + " at " + who.firstLogin.ToString("HH:mm:ss")); Player.SendMessage(p, "> > logged in &a" + who.totalLogins + " %Stimes, &c" + who.totalKicked + " %Sof which ended in a kick."); Player.SendMessage(p, "> > " + Awards.AwardAmount(who.name) + " awards"); string[] data = Ban.GetBanData(who.name); if (data != null) { Player.SendMessage(p, "> > is banned for " + data[1] + " by " + data[0]); } if (who.isDev) { Player.SendMessage(p, "> > Player is a &9Developer"); } else if (who.isMod) { Player.SendMessage(p, "> > Player is a &9MCGalaxy Moderator"); } if (!CheckAdditionalPerm(p)) { return; } string givenIP; if (Server.bannedIP.Contains(who.ip)) { givenIP = "&8" + who.ip + ", which is banned"; } else { givenIP = who.ip; } Player.SendMessage(p, "> > the IP of " + givenIP); if (Server.useWhitelist && Server.whiteList.Contains(who.name)) { Player.SendMessage(p, "> > Player is &fWhitelisted"); } }
public static void Output(Player p, WhoInfo who, bool canSeeIP) { Player.SendMessage(p, who.FullName + " %S(" + who.Name + ") has:"); Player.SendMessage(p, ">> Rank of " + who.Group.ColoredName); if (Economy.Enabled) { Player.SendMessage(p, ">> &a" + who.Deaths + " &cdeaths%S, &a" + who.Money + " %S" + Server.moneys + ", " + Awards.AwardAmount(who.Name) + " awards"); } else { Player.SendMessage(p, ">> &a" + who.Deaths + " &cdeaths%s, " + Awards.AwardAmount(who.Name) + " awards"); } if (who.LoginBlocks >= 0) { Player.SendMessage(p, ">> &bModified &a" + who.TotalBlocks + " &eblocks, &a" + who.LoginBlocks + " &esince login"); } else { Player.SendMessage(p, ">> &bModified &a" + who.TotalBlocks + " &eblocks"); } if (who.TimeOnline.Ticks > 0) { Player.SendMessage(p, ">> Spent " + Shorten(who.TimeSpent) + " on the server, " + Shorten(who.TimeOnline) + " this session"); } else { Player.SendMessage(p, ">> Spent " + Shorten(who.TimeSpent) + " on the server"); } if (who.Last.Ticks > 0) { Player.SendMessage(p, ">> First login &a" + who.First.ToString("yyyy-MM-dd") + "%S, last login &a" + who.Last.ToString("yyyy-MM-dd")); } else { Player.SendMessage(p, ">> First login on &a" + who.First.ToString("yyyy-MM-dd") + "%S, and is currently &aonline"); } Player.SendMessage(p, ">> Logged in &a" + who.Logins + " %Stimes, &c" + who.Kicks + " %Sof which ended in a kick"); string[] data = Ban.GetBanData(who.Name); if (data != null) { Player.SendMessage(p, ">> is banned for " + data[1] + " by " + data[0]); } if (Server.Devs.CaselessContains(who.Name)) { Player.SendMessage(p, ">> Player is a &9Developer"); } if (Server.Mods.CaselessContains(who.Name)) { Player.SendMessage(p, ">> Player is a &9MCGalaxy Moderator"); } if (canSeeIP) { string ipMsg = who.IP; if (Server.bannedIP.Contains(who.IP)) { ipMsg = "&8" + who.IP + ", which is banned"; } Player.SendMessage(p, ">> The IP of " + ipMsg); if (Server.useWhitelist && Server.whiteList.Contains(who.Name)) { Player.SendMessage(p, ">> Player is &fWhitelisted"); } } if (!Server.zombie.Running) { return; } Player.SendMessage(p, ">> Survived &a" + who.RoundsTotal + " %Srounds total, most in a row was &e" + who.RoundsMax); Player.SendMessage(p, ">> Infected &a" + who.InfectedTotal + " %Splayers total, most in a round was &e" + who.InfectedMax); }
public static void Output(Player p, WhoInfo who, bool canSeeIP) { Player.Message(p, who.FullName + " %S(" + who.Name + ") has:"); Player.Message(p, " Rank of " + who.Group.ColoredName); if (Economy.Enabled) { Player.Message(p, " &a{0} &cdeaths%S, &a{2} %S{3}, {1} %Sawards", who.Deaths, Awards.AwardAmount(who.Name), who.Money, Server.moneys); } else { Player.Message(p, " &a{0} &cdeaths%S, {1} %Sawards", who.Deaths, Awards.AwardAmount(who.Name)); } if (who.LoginBlocks >= 0) { Player.Message(p, " Modified &a{0} %Sblocks, &a{1} %Ssince login", who.TotalBlocks, who.LoginBlocks); } else { Player.Message(p, " Modified &a{0} %Sblocks", who.TotalBlocks); } Player.Message(p, " &a{0} %Splaced, &a{1} %Sdeleted, &a{2} %Sdrawn", who.TotalPlaced, who.TotalDeleted, who.TotalDrawn); if (who.TimeOnline.Ticks > 0) { Player.Message(p, " Spent &a{0} %Son the server, &a{1} %Sthis session", who.TimeSpent.Shorten(), who.TimeOnline.Shorten()); } else { Player.Message(p, " Spent &a{0} %Son the server", who.TimeSpent.Shorten()); } if (who.Last.Ticks > 0) { Player.Message(p, " First login &a" + who.First.ToString("yyyy-MM-dd") + "%S, last login &a" + who.Last.ToString("yyyy-MM-dd")); } else { Player.Message(p, " First login on &a" + who.First.ToString("yyyy-MM-dd") + "%S, and is currently &aonline"); } Player.Message(p, " Logged in &a{0} %Stimes, &c{1} %Sof which ended in a kick", who.Logins, who.Kicks); if (who.Group.Permission == LevelPermission.Banned) { string[] data = Ban.GetBanData(who.Name); if (data != null) { Player.Message(p, " is banned for " + data[1] + " by " + data[0]); } else { Player.Message(p, " is banned"); } } if (Server.Devs.CaselessContains(who.Name.TrimEnd('+'))) { Player.Message(p, " Player is an &9MCGalaxy Developer"); } if (Server.Mods.CaselessContains(who.Name.TrimEnd('+'))) { Player.Message(p, " Player is an &9MCGalaxy Moderator"); } if (canSeeIP) { string ipMsg = who.IP; if (Server.bannedIP.Contains(who.IP)) { ipMsg = "&8" + who.IP + ", which is banned"; } Player.Message(p, " The IP of " + ipMsg); if (ServerConfig.WhitelistedOnly && Server.whiteList.Contains(who.Name)) { Player.Message(p, " Player is &fWhitelisted"); } } if (who.AfkMessage != null) { Player.Message(p, " Idle for {0} (AFK {1}%S)", who.IdleTime.Shorten(), who.AfkMessage); } else if (who.IdleTime.TotalMinutes >= 1) { Player.Message(p, " Idle for {0}", who.IdleTime.Shorten()); } if (Core.Match != null) { Player.Message(p, " Participated in &a{0} %Sgames", who.TotalRounds); Player.Message(p, " Won &a{0} %Sgames", who.Wins); Player.Message(p, " Lost &a{0} %Sgames", who.Losses); Player.Message(p, " Drawed &a{0} %Sgames", who.Draws); Player.Message(p, " Scored &a{0} %Sgoals", who.Goals); Player.Message(p, " Made &a{0} %Sassists", who.Assists); Player.Message(p, " Saved &a{0} %Stimes", who.Saves); Player.Message(p, " Scored on themselves &a{0} %Stimes", who.OwnGoals); Player.Message(p, " Fouled &a{0} %Stimes", who.Fouls); Player.Message(p, " Has skill slots: &a{0}", who.Pace); } if (!Server.zombie.Running) { return; } Player.Message(p, " Survived &a{0} %Srounds (max &e{1}%S)", who.RoundsTotal, who.RoundsMax); Player.Message(p, " Infected &a{0} %Splayers (max &e{1}%S)", who.InfectedTotal, who.InfectedMax); }