| 1 |
using System; |
using System; |
| 2 |
|
using System.Collections; |
| 3 |
using System.Collections.Generic; |
using System.Collections.Generic; |
| 4 |
using System.Text; |
using System.Text; |
| 5 |
using Nini.Config; |
using Nini.Config; |
| 6 |
|
using OpenSim.Region.ClientStack; |
| 7 |
using OpenSim.Region.Environment.Interfaces; |
using OpenSim.Region.Environment.Interfaces; |
| 8 |
using OpenSim.Region.Environment.Scenes; |
using OpenSim.Region.Environment.Scenes; |
| 9 |
|
|
| 12 |
class RexLoginModule : IRegionModule |
class RexLoginModule : IRegionModule |
| 13 |
{ |
{ |
| 14 |
private Scene m_firstScene; |
private Scene m_firstScene; |
| 15 |
|
private IClientNetworkServer m_udpserver; |
| 16 |
|
|
| 17 |
public void Initialise(Scene scene, IConfigSource source) |
public void Initialise(Scene scene, IConfigSource source) |
| 18 |
{ |
{ |
| 19 |
|
if (m_udpserver == null) |
| 20 |
|
m_udpserver = new RexUDPServer(); |
| 21 |
|
|
| 22 |
|
m_udpserver.AddScene(scene); |
| 23 |
|
|
| 24 |
m_firstScene = scene; |
m_firstScene = scene; |
| 25 |
|
scene.AddHTTPHandler("/rexlogin", OnLoginRequest); |
| 26 |
|
} |
| 27 |
|
|
| 28 |
|
public Hashtable OnLoginRequest(Hashtable keysvals) |
| 29 |
|
{ |
| 30 |
|
Hashtable reply = new Hashtable(); |
| 31 |
|
int statuscode = 200; |
| 32 |
|
|
| 33 |
|
reply["str_response_string"] = "Test"; |
| 34 |
|
reply["int_response_code"] = statuscode; |
| 35 |
|
reply["content_type"] = "text/xml"; |
| 36 |
|
|
| 37 |
|
return reply; |
| 38 |
} |
} |
| 39 |
|
|
| 40 |
|
|
| 41 |
public void PostInitialise() |
public void PostInitialise() |
| 42 |
{ |
{ |
| 43 |
} |
} |