Implemented logouts (so you can logout and then return later! woohoo)

adam
gareth 2007-03-02 23:23:27 +00:00
parent cb55056e3b
commit 0227f31cdd
1 changed files with 12 additions and 0 deletions

View File

@ -150,6 +150,18 @@ namespace OpenSim
Thread AssetLoaderThread = new Thread(new ThreadStart(AssetLoader));
AssetLoaderThread.Start();
break;
case PacketType.LogoutRequest:
Console.WriteLine("OpenSimClient.cs:ProcessInPacket() - Got a logout request");
OpenSim_Main.local_world.Entities.Remove(this.AgentID);
WebRequest DeleteSession = WebRequest.Create(OpenSim_Main.cfg.GridURL + "/usersessions/" + OpenSim_Main.cfg.GridSendKey + "/" + this.AgentID.ToString() + this.CircuitCode.ToString() + "/delete");
WebResponse GridResponse = DeleteSession.GetResponse();
StreamReader sr = new StreamReader(GridResponse.GetResponseStream());
String grTest = sr.ReadLine();
sr.Close();
GridResponse.Close();
this.ClientThread.Abort();
break;
}
}