/[drupal]/contributions/modules/secondlife/samples/sltest.module
ViewVC logotype

Diff of /contributions/modules/secondlife/samples/sltest.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.4, Sun Dec 14 20:19:01 2008 UTC revision 1.4.2.1, Mon Dec 15 04:51:15 2008 UTC
# Line 14  function sltest_help($section) { Line 14  function sltest_help($section) {
14  }  }
15    
16  function sltest_dispatch($cmd, &$sl, $args) {  function sltest_dispatch($cmd, &$sl, $args) {
17    
18    switch($cmd) {    switch($cmd) {
19      case 'hello':      case 'hello':
20        $sl->response['message'] = "Hi there, $sl->ownername";        $sl->response['message'] = "success;Hi there, $sl->ownername";
21        $sl->response['status'] = TRUE;        $sl->response['status'] = TRUE;
22        break;        break;
23    
24      case 'datetime':      case 'datetime':
25        $date = format_date(time(), 'custom', 'Y-m-d G:i:s');        $date = format_date(time(), 'custom', 'Y-m-d G:i:s');
26        $sl->response['message'] = "Server date/time: $date";        $sl->response['message'] = "success;Server date/time: $date";
27        $sl->response['status'] = TRUE;        $sl->response['status'] = TRUE;
28        break;        break;
29    
30      case 'dump':      case 'dump':
31                            $output = array();
32        foreach($args as $k => $v) {        foreach($args as $k => $v) {
33          $output .= "$k : $v";          array_push($output,"$k -> $v");
34        }        }
35    
36        $sl->response['message'] = "ARGS: $output";        $sl->response['message'] = "success;ARGS: ".implode(" : ",$output);
37        $sl->response['status'] = TRUE;        $sl->response['status'] = TRUE;
38        break;        break;
39    
# Line 41  function sltest_dispatch($cmd, &$sl, $ar Line 43  function sltest_dispatch($cmd, &$sl, $ar
43        break;        break;
44    }    }
45  }  }
   

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.4.2.1

  ViewVC Help
Powered by ViewVC 1.1.2