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

BanShared_Callback() public static méthode

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

			string notice;
			ArrayList list = null;

			if ( okay )
			{
				Account a = (Account)state;
				list = GetSharedAccounts( a.LoginIPs );

				for ( int i = 0; i < list.Count; ++i )
				{
					((Account)list[i]).SetUnspecifiedBan( from );
					((Account)list[i]).Banned = true;
				}

				notice = "All addresses in the list have been banned.";
			}
			else
			{
				notice = "You have chosen not to ban all shared accounts.";
			}

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

			if ( okay )
				from.SendGump( new BanDurationGump( list ) );
		}