mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-25 22:30:52 -04:00
whois should show if a player is afk, closes #154.
This commit is contained in:
parent
ac852e5897
commit
f0f3b38bc0
@ -38,27 +38,24 @@ namespace MCGalaxy.Commands
|
||||
|
||||
if (message == "list") {
|
||||
foreach (string s in Server.afkset) {
|
||||
Player pl = PlayerInfo.FindExact(s);
|
||||
if (pl == null || !Entities.CanSee(p, pl)) continue;
|
||||
Player pl = PlayerInfo.FindExact(s);
|
||||
if (pl == null || !Entities.CanSee(p, pl)) continue;
|
||||
Player.SendMessage(p, s);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (p.joker)
|
||||
message = "";
|
||||
if (p.joker) message = "";
|
||||
if (!Server.afkset.Contains(p.name)) {
|
||||
p.afkStart = DateTime.Now;
|
||||
p.afkMessage = message;
|
||||
Server.afkset.Add(p.name);
|
||||
if (p.muted)
|
||||
message = "";
|
||||
Player.GlobalMessage("-" + p.ColoredName + "%S- is AFK " + message);
|
||||
//IRCBot.Say(p.name + " is AFK " + message);
|
||||
Server.IRC.Say(p.DisplayName + " is AFK " + message);
|
||||
} else {
|
||||
Server.afkset.Remove(p.name);
|
||||
p.afkMessage = null;
|
||||
Player.GlobalMessage("-" + p.ColoredName + "%S- is no longer AFK");
|
||||
//IRCBot.Say(p.name + " is no longer AFK");
|
||||
Server.IRC.Say(p.DisplayName + " is no longer AFK");
|
||||
}
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ namespace MCGalaxy.Commands {
|
||||
info.TimeSpent = who.time; info.TimeOnline = DateTime.Now - who.timeLogged;
|
||||
info.First = who.firstLogin;
|
||||
info.Logins = who.totalLogins; info.Kicks = who.totalKicked;
|
||||
info.IP = who.ip;
|
||||
info.IP = who.ip; info.AfkMessage = who.afkMessage;
|
||||
|
||||
info.RoundsTotal = who.Game.TotalRoundsSurvived;
|
||||
info.RoundsMax = who.Game.MaxRoundsSurvived;
|
||||
|
@ -30,6 +30,7 @@ namespace MCGalaxy.Commands {
|
||||
public string IP;
|
||||
public int RoundsTotal, RoundsMax;
|
||||
public int InfectedTotal, InfectedMax;
|
||||
public string AfkMessage;
|
||||
|
||||
public static void Output(Player p, WhoInfo who, bool canSeeIP) {
|
||||
Player.SendMessage(p, who.FullName + " %S(" + who.Name + ") has:");
|
||||
@ -79,6 +80,8 @@ namespace MCGalaxy.Commands {
|
||||
if (Server.useWhitelist&& Server.whiteList.Contains(who.Name))
|
||||
Player.SendMessage(p, ">> Player is &fWhitelisted");
|
||||
}
|
||||
if (who.AfkMessage != null)
|
||||
Player.SendMessage(p, ">> Is &aAFK %S(" + who.AfkMessage + "%S)");
|
||||
|
||||
if (!Server.zombie.Running) return;
|
||||
Player.SendMessage(p, ">> Survived &a" + who.RoundsTotal +
|
||||
|
@ -72,6 +72,7 @@ namespace MCGalaxy {
|
||||
public bool cmdTimer = false;
|
||||
public bool UsingWom = false;
|
||||
public string BrushName = "normal", DefaultBrushArgs = "";
|
||||
public string afkMessage;
|
||||
|
||||
byte[] buffer = new byte[0];
|
||||
byte[] tempbuffer = new byte[0xFF];
|
||||
|
Loading…
x
Reference in New Issue
Block a user