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

RemoveLoginIPs_Callback() public static méthode

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

			Account a = (Account)state;

			string notice;

			if ( okay )
			{
				IPAddress[] ips = a.LoginIPs;

				if ( ips.Length != 0 && AccountHandler.IPTable.ContainsKey( ips[0] ) )
					--AccountHandler.IPTable[ips[0]];

				a.LoginIPs = new IPAddress[0];

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

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