public static void Marked_Callback( Mobile from, bool okay, object state )
{
if ( from.AccessLevel < AccessLevel.Administrator )
return;
object[] states = (object[])state;
bool ban = (bool)states[0];
ArrayList list = (ArrayList)states[1];
ArrayList rads = (ArrayList)states[2];
int page = (int)states[3];
if ( okay )
{
if ( !ban )
NetState.Pause();
for ( int i = 0; i < rads.Count; ++i )
{
Account acct = (Account)rads[i];
if ( ban )
{
CommandLogging.WriteLine( from, "{0} {1} banning account {2}", from.AccessLevel, CommandLogging.Format( from ), acct.Username );
acct.SetUnspecifiedBan( from );
acct.Banned = true;
}
else
{
CommandLogging.WriteLine( from, "{0} {1} deleting account {2}", from.AccessLevel, CommandLogging.Format( from ), acct.Username );
acct.Delete();
rads.RemoveAt( i-- );
list.Remove( acct );
}
}
if ( !ban )
NetState.Resume();
from.SendGump( new NoticeGump( 1060637, 30720, String.Format( "You have {0} the account{1}.", ban ? "banned" : "deleted", rads.Count == 1 ? "" : "s" ), 0xFFC000, 420, 280, new NoticeGumpCallback( ResendGump_Callback ), new object[]{ list, rads, ban ? page : 0 } ) );
if ( ban )
from.SendGump( new BanDurationGump( rads ) );
}
else
{
from.SendGump( new NoticeGump( 1060637, 30720, String.Format( "You have chosen not to {0} the account{1}.", ban ? "ban" : "delete", rads.Count == 1 ? "" : "s" ), 0xFFC000, 420, 280, new NoticeGumpCallback( ResendGump_Callback ), new object[]{ list, rads, page } ) );
}
}