Ejemplo n.º 1
0
 public static void TellStatTo(Client about, ClientSettings settings, Client toPlayer)
 {
     string name = "Offline";
     TimeSpan uptime = settings.Uptime;
     if (about != null)
     {
         uptime = about.Uptime;
         name = about.Name;
         if (about.Country != null)
             toPlayer.TellSystem(Chat.Yellow + name + " ", "From: " + about.Country);
     }
     
     if (settings.FirstOnline.Ticks > 0)
         toPlayer.TellSystem(Chat.Yellow + name + " ", "First login: "******"0") + Chat.Blue + " days ago");
     if (uptime.TotalDays > 1)
         toPlayer.TellSystem(Chat.Yellow + name + " ", "Online: " + uptime.TotalDays.ToString("0.0") + Chat.Blue + " days");
     else
         toPlayer.TellSystem(Chat.Yellow + name + " ", "Online: " + uptime.TotalHours.ToString("0.0") + Chat.Blue + " hours");
     toPlayer.TellSystem(Chat.Yellow + name + " ", "Walked " + settings.WalkDistance.ToString("0") + Chat.Blue + " blocks");
     toPlayer.TellSystem(Chat.Yellow + name + " ", "Last Online: " + (DateTime.Now - settings.LastOnline).TotalHours.ToString("0.0") + " hours ago");
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Only for offline players
 /// </summary>
 protected Client()
 {
     this.Settings = new ClientSettings();
 }