예제 #1
0
 public void Execute(Player player, string[] args)
 {
     if (args.Length == 0)
     {
         player.SendHelp("Usage: /oryxsay <saytext>");
     }
     else
     {
         string saytext = string.Join(" ", args);
         player.SendEnemy("Oryx the Mad God", saytext);
     }
     var dir = @"logs";
     if (!System.IO.Directory.Exists(dir))
         System.IO.Directory.CreateDirectory(dir);
     using (System.IO.StreamWriter writer = new System.IO.StreamWriter(@"logs\AdminLog.txt", true))
     {
         writer.WriteLine("[" + DateTime.Now + "]" + player.nName + " has used the /osay");
     }
 }