void EventManager_OnAvatarEnteringNewParcel(IScenePresence presence, ILandObject oldParcel)
{
string network;
if(TryGetNetwork(presence, out network))
{
if(clients.ContainsKey(presence.UUID))
{
Client client = clients[presence.UUID];
if(client.Connection.Address == network)
SwitchChannels(presence, oldParcel, client);
}
else
{
CloseClient(presence);
CreateIRCConnection(presence, network);
}
}
else
CloseClient(presence);
}