var path; var maxConnected; function pluginInit(hash) { //This method is called when the room starts trace("----AdminPlugin Initialized----"); maxConnected = 0; setInterval("run", 500); } function run() { var helper = Plugin.getPluginHelper(); /* var totalMemory = helper.getMemoryStatistics(); trace("----") trace(totalMemory[0]) trace(totalMemory[1]) trace(totalMemory[2])*/ var num = getLoggedInUserCount(); if (num> maxConnected) { maxConnected = num; trace("Max connected: "+maxConnected); } } function pluginRequest(hash) { var caller = hash.get("ExecutingUserName"); var method = hash.get("Method"); if (method == "GetZonesAndRooms") { inspectServer(caller); } else if (method == "GetRoomInfo") { inspectRoom(caller, hash.get("zone"), hash.get("room")); } else if (method == "kick") { kick(hash.get("name")); } else if (method == "ban") { ban(hash.get("name"), 100000); } else if (method == "GetBasicStats") { getBasicStats(caller); } } function getBasicStats(caller) { var numConnected = getLoggedInUserCount(); var zones = getAllZones(); var numZones = zones.length; var numRooms = 0; for (var i=0;i"; for (var j=0;j