From 0227f31cdd29633dd6eefc88228bf69611b8d765 Mon Sep 17 00:00:00 2001 From: gareth Date: Fri, 2 Mar 2007 23:23:27 +0000 Subject: [PATCH] Implemented logouts (so you can logout and then return later! woohoo) --- src/OpenSimClient.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/OpenSimClient.cs b/src/OpenSimClient.cs index 83d859941f..47f6dbfda3 100644 --- a/src/OpenSimClient.cs +++ b/src/OpenSimClient.cs @@ -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; } }