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

FirewallShared_Callback() public static méthode

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

			string notice;

			if ( okay )
			{
				Account a = (Account)state;

				for ( int i = 0; i < a.LoginIPs.Length; ++i )
					Firewall.Add( a.LoginIPs[i] );

				notice = "All addresses in the list have been firewalled.";
			}
			else
			{
				notice = "You have chosen not to firewall all addresses.";
			}

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