public static void OnReceive( NetState state, PacketReader pvSrc )
{
byte cmd = pvSrc.ReadByte();
if ( cmd == 0x02 )
{
Authenticate( state, pvSrc );
}
else if ( cmd == 0xFE )
{
state.Send( new CompactServerInfo() );
state.Dispose();
}
else if ( cmd == 0xFF )
{
string statStr = String.Format( ", Name={0}, Age={1}, Clients={2}, Items={3}, Chars={4}, Mem={5}K, Ver={6}", Server.Misc.ServerList.ServerName, (int)(DateTime.Now - Server.Items.Clock.ServerStart).TotalHours, NetState.Instances.Count, World.Items.Count, World.Mobiles.Count, (int)(System.GC.GetTotalMemory( false ) / 1024), ProtocolVersion );
state.Send( new UOGInfo( statStr ) );
state.Dispose();
}
else if ( !IsAuth( state ) )
{
Console.WriteLine( "ADMIN: Unauthorized packet from {0}, disconnecting", state );
Disconnect( state );
}
else
{
if ( !RemoteAdminHandlers.Handle( cmd, state, pvSrc ) )
Disconnect( state );
}
}