private static void OnLogin(LoginEventArgs e)
{
Mobile from = e.Mobile;
if (AccountHandler.LockdownLevel > AccessLevel.Player)
{
string notice;
Accounting.Account acct = from.Account as Accounting.Account;
if (acct == null || !acct.HasAccess(from.NetState))
{
if (from.AccessLevel == AccessLevel.Player)
notice = "The server is currently under lockdown. No players are allowed to log in at this time.";
else
notice = "The server is currently under lockdown. You do not have sufficient access level to connect.";
Timer.DelayCall(TimeSpan.FromSeconds(1.0), new TimerStateCallback(Disconnect), from);
}
else if (from.AccessLevel >= AccessLevel.Administrator)
{
notice = "The server is currently under lockdown. As you are an administrator, you may change this from the [Admin gump.";
}
else
{
notice = "The server is currently under lockdown. You have sufficient access level to connect.";
}
from.SendGump(new NoticeGump(1060637, 30720, notice, 0xFFC000, 300, 140, null, null));
return;
}
}