aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Examples/SimpleApp2/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Examples/SimpleApp2/Program.cs')
-rw-r--r--OpenSim/Examples/SimpleApp2/Program.cs21
1 files changed, 19 insertions, 2 deletions
diff --git a/OpenSim/Examples/SimpleApp2/Program.cs b/OpenSim/Examples/SimpleApp2/Program.cs
index 88b7b17..85ce703 100644
--- a/OpenSim/Examples/SimpleApp2/Program.cs
+++ b/OpenSim/Examples/SimpleApp2/Program.cs
@@ -20,6 +20,7 @@ namespace SimpleApp2
20 private ConsoleBase m_console; 20 private ConsoleBase m_console;
21 private RegionInfo m_regionInfo; 21 private RegionInfo m_regionInfo;
22 private float[] m_map; 22 private float[] m_map;
23 private AuthenticateSessionsBase m_circuitManager;
23 24
24 private void Run() 25 private void Run()
25 { 26 {
@@ -34,10 +35,11 @@ namespace SimpleApp2
34 string simAddr = "127.0.0.1"; 35 string simAddr = "127.0.0.1";
35 int simPort = 9000; 36 int simPort = 9000;
36 37
38 m_circuitManager = new AuthenticateSessionsBase();
39
37 LoginServer loginServer = new LoginServer(simAddr, simPort, 0, 0, false); 40 LoginServer loginServer = new LoginServer(simAddr, simPort, 0, 0, false);
38 loginServer.Startup(); 41 loginServer.Startup();
39 42
40 AuthenticateSessionsBase localSessions = new AuthenticateSessionsBase();
41 loginServer.SetSessionHandler( AddNewSessionHandler ); 43 loginServer.SetSessionHandler( AddNewSessionHandler );
42 44
43 InventoryCache inventoryCache = new InventoryCache(); 45 InventoryCache inventoryCache = new InventoryCache();
@@ -48,7 +50,7 @@ namespace SimpleApp2
48 50
49 AssetCache assetCache = new AssetCache(assetServer); 51 AssetCache assetCache = new AssetCache(assetServer);
50 52
51 UDPServer udpServer = new UDPServer(simPort, assetCache, inventoryCache, m_console, localSessions); 53 UDPServer udpServer = new UDPServer(simPort, assetCache, inventoryCache, m_console, m_circuitManager );
52 PacketServer packetServer = new MyPacketServer(m_map, udpServer, (uint) simPort ); 54 PacketServer packetServer = new MyPacketServer(m_map, udpServer, (uint) simPort );
53 udpServer.ServerListener(); 55 udpServer.ServerListener();
54 56
@@ -89,6 +91,20 @@ namespace SimpleApp2
89 private bool AddNewSessionHandler(ulong regionHandle, Login loginData) 91 private bool AddNewSessionHandler(ulong regionHandle, Login loginData)
90 { 92 {
91 m_console.WriteLine(LogPriority.NORMAL, "Region [{0}] recieved Login from [{1}] [{2}]", regionHandle, loginData.First, loginData.Last); 93 m_console.WriteLine(LogPriority.NORMAL, "Region [{0}] recieved Login from [{1}] [{2}]", regionHandle, loginData.First, loginData.Last);
94
95 AgentCircuitData agent = new AgentCircuitData();
96 agent.AgentID = loginData.Agent;
97 agent.firstname = loginData.First;
98 agent.lastname = loginData.Last;
99 agent.SessionID = loginData.Session;
100 agent.SecureSessionID = loginData.SecureSession;
101 agent.circuitcode = loginData.CircuitCode;
102 agent.BaseFolder = loginData.BaseFolder;
103 agent.InventoryFolder = loginData.InventoryFolder;
104 agent.startpos = new LLVector3(128, 128, 70);
105
106 m_circuitManager.AddNewCircuit(agent.circuitcode, agent);
107
92 return true; 108 return true;
93 } 109 }
94 110
@@ -99,6 +115,7 @@ namespace SimpleApp2
99 app.Run(); 115 app.Run();
100 } 116 }
101 117
118
102 #region IWorld Members 119 #region IWorld Members
103 120
104 void IWorld.AddNewAvatar(IClientAPI remoteClient, LLUUID agentID, bool child) 121 void IWorld.AddNewAvatar(IClientAPI remoteClient, LLUUID agentID, bool child)