예제 #1
0
        public override void RunCommand(string[] args, Optional <Player> sender)
        {
            try
            {
                string playerName = sender.IsPresent() ? sender.Get().Name : "SERVER";
                serverConfig.ChangeAdminPassword(args[0]);

                Log.Info($"Admin password changed to \"{args[0]}\" by {playerName}");
                SendMessageToPlayer(sender, "Admin password changed");
            }
            catch (Exception ex)
            {
                Log.Error($"Error attempting to change admin password to \"{args[0]}\"", ex);
            }
        }
예제 #2
0
 private void ChangeAdminPassword(string password, string name)
 {
     serverConfig.ChangeAdminPassword(password);
     Log.Info($"Admin password changed to \"{password}\" by {name}");
 }