Welcome to mirror list, hosted at ThFree Co, Russian Federation.

weblist.php « scripts - github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 62146970fc994e7a73a1702624df5878f513c837 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<html>
<head>
<title>Userlist</title>
</head>
<body>
<?php

#
# Murmur.php is generated by calling
# slice2php /path/to/Murmur.ice
# in this directory
#

if (Ice_intversion() >= 30400) {
  require 'Ice.php';
  require 'Murmur.php';
} else {
  Ice_loadProfile();
}

try {
  if (Ice_intversion() >= 30400) {
    $ICE = Ice_initialize();
  }

  $base = $ICE->stringToProxy("Meta:tcp -h 127.0.0.1 -p 6502");
  $meta = $base->ice_checkedCast("::Murmur::Meta");

  $servers = $meta->getBootedServers();
  $default = $meta->getDefaultConf();
  foreach($servers as $s) {
    $name = $s->getConf("registername");
    if (! $name) {
      $name =  $default["registername"];
    }
    echo "<h1>SERVER #" . $s->id() . " " .$name ."</h1>\n";
    echo "<table><tr><th>Name</th><th>Channel</th></tr>\n";

    $channels = $s->getChannels();
    $players = $s->getUsers();

    foreach($players as $id => $state) {
      $chan = $channels[$state->channel];
      echo "<tr><td>".$state->name."</td><td>".$chan->name."</td></tr>\n";
    }
    echo "</table>\n";
  }
} catch (Ice_LocalException $ex) {
  print_r($ex);
}

?>
</body>
</html>