[Opensim-dev] RegionReady

BlueWall jamesh at bluewallgroup.com
Sat May 28 20:41:06 UTC 2011


Hello,

I have worked on the RegionReady module to add a couple of features to
help prevent logins to regions until the scripts are loaded. We also
have an alert system to post status to an external service. An example
is listed below.

A couple of configuration changes to enable things. They are in
OpenSimDefaults.ini...

login_disable and alert_uri

Setting login_disable = true will prevent logins until scripts are loaded

alert_uri = "http://mygridmonitor.net/ready.php/alert/"
setting this to empty disables it.


sample alert handler...

<?php

// ready.php
// (c) 2011 BlueWall Information Technologies, LLC
// Apache License version 2
// http://www.apache.org/licenses/LICENSE-2.0.html

$method = $_SERVER["PATH_INFO"];

if ($method == "/alert/")
{
  $msg = json_decode($HTTP_RAW_POST_DATA, true);
  $alert = $msg['alert'];
  $login = $msg['login'];
  $region = $msg['region_name'];
  $id = $msg['region_id'];

  $file = fopen("/tmp/LoginAlerts.txt",a);
  fwrite($file,"*******************************\n".
                  "ALERT: ".$alert.
                  "  REGION: ".$region.
                  "  LOGIN STATUS: ".$login."\n".
                  "REGION ID: ".$id."\n");
  fclose($file);

}

?>



More information about the Opensim-dev mailing list