private void onAddAvatar(ScenePresence client) { string uuid = client.UUID.ToString(); string msg = MGMJson.AddAvatar(uuid); mgmLink.send(msg); }
public void AddRegion(Scene scene) { if (!enabled) { return; } log("Adding region to MGM"); npc = (NPCModule)scene.RequestModuleInterface <INPCModule>(); if (npc == null || !npc.Enabled) { enabled = false; log("ERROR: NPC module must be enabled for MGM"); return; } scene.AddCommand("mgm", this, "mgm status", "status", "Print the status of the MGM module", consoleStatus); scene.AddCommand("mgm", this, "mgm addUser", "addUser", "Test adding a user", addUser); scene.AddCommand("mgm", this, "mgm removeUser", "removeUser", "Test removing a user", removeUser); mgmLink = new MGMLink(new IPEndPoint(mgmAddress, mgmPort), log); mgmLink.start(); registerEvents(scene.EventManager); string regMsg = MGMJson.Register(scene.Name, scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY, scene.RegionInfo.RegionSizeX); mgmLink.send(regMsg); this.scene = scene; mgr = new MGMClientManager(scene, log); }
private void onInstantMessage(GridInstantMessage msg) { if (msg.dialog != 0) { return; } string sender = msg.fromAgentID.ToString(); string target = msg.toAgentID.ToString(); int isGroup; if (msg.fromGroup) { isGroup = 1; // } else { isGroup = 0; } string body = msg.message; String message = MGMJson.InstantMessage(sender, target, isGroup, body); link.send(message); }
public void AddRegion(Scene scene) { if(!enabled) return; log("Adding region to MGM"); npc = (NPCModule)scene.RequestModuleInterface<INPCModule>(); if(npc == null || !npc.Enabled) { enabled = false; log("ERROR: NPC module must be enabled for MGM"); return; } scene.AddCommand("mgm",this,"mgm status","status","Print the status of the MGM module", consoleStatus); scene.AddCommand("mgm",this,"mgm addUser","addUser","Test adding a user", addUser); mgmLink = new MGMLink(new IPEndPoint(mgmAddress, mgmPort), log); mgmLink.start(); registerEvents(scene.EventManager); string regMsg = MGMJson.Register(scene.Name, scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY, scene.RegionInfo.RegionSizeX); mgmLink.send(regMsg); this.scene = scene; mgr = new MGMClientManager(scene,log); }