Server.RemoteAdmin.RemoteAdminLogging.WriteLine C# (CSharp) Méthode

WriteLine() public static méthode

public static WriteLine ( Server.Network.NetState state, string format ) : void
state Server.Network.NetState
format string
Résultat void
		public static void WriteLine( NetState state, string format, params object[] args )
		{
			for ( int i = 0; i < args.Length; i++ )
				args[i] = Commands.CommandLogging.Format( args[i] );

			WriteLine( state, String.Format( format, args ) );
		}

Usage Example

Exemple #1
0
        private static void RemoveAccount(NetState state, PacketReader pvSrc)
        {
            if (state.Account.AccessLevel < AccessLevel.Administrator)
            {
                state.Send(new MessageBoxMessage("You do not have permission to delete accounts.", "Account Access Exception"));
                return;
            }

            IAccount a = Accounts.GetAccount(pvSrc.ReadString());

            if (a == null)
            {
                state.Send(new MessageBoxMessage("The account could not be found (and thus was not deleted).", "Account Not Found"));
            }
            else if (!CanAccessAccount(state.Account, a))
            {
                state.Send(new MessageBoxMessage("You cannot delete an account with an access level greater than or equal to your own.", "Account Access Exception"));
            }
            else if (a == state.Account)
            {
                state.Send(new MessageBoxMessage("You may not delete your own account.", "Not Allowed"));
            }
            else
            {
                RemoteAdminLogging.WriteLine(state, "Deleted Account {0}", a);
                a.Delete();
                state.Send(new MessageBoxMessage("The requested account (and all it's characters) has been deleted.", "Account Deleted"));
            }
        }
All Usage Examples Of Server.RemoteAdmin.RemoteAdminLogging::WriteLine