Server.Gumps.AdminGump.Firewall_Callback C# (CSharp) Méthode

Firewall_Callback() public static méthode

public static Firewall_Callback ( Server.Mobile from, bool okay, object state ) : void
from Server.Mobile
okay bool
state object
Résultat void
		public static void Firewall_Callback( Mobile from, bool okay, object state )
		{
			if ( from.AccessLevel < AccessLevel.Administrator )
				return;

			object[] states = (object[])state;

			Account a = (Account)states[0];
			object toFirewall = states[1];

			string notice;

			if ( okay )
			{
				Firewall.Add( toFirewall );

				notice = String.Format( "{0} : Added to firewall.", toFirewall );
			}
			else
			{
				notice = "You have chosen not to firewall the address.";
			}

			from.SendGump( new AdminGump( from, AdminGumpPage.AccountDetails_Access_ClientIPs, 0, null, notice, a ) );
		}