diff options
Diffstat (limited to 'swat/nbt_server')
-rw-r--r-- | swat/nbt_server/index.esp | 24 | ||||
-rw-r--r-- | swat/nbt_server/menu.js | 4 |
2 files changed, 28 insertions, 0 deletions
diff --git a/swat/nbt_server/index.esp b/swat/nbt_server/index.esp new file mode 100644 index 0000000000..133615c52c --- /dev/null +++ b/swat/nbt_server/index.esp @@ -0,0 +1,24 @@ +<% page_header("columns", "NBT Server", "/nbt_server/menu.js"); + + libinclude("base.js"); + libinclude("management.js"); +%> + +<h1>NBT Server</h1> + +<% +writefln("The NBT server is: %s\n", server_status("nbt")); +%> + +<h2>Packet statistics</h2> +<% + +var stats = nbtd_statistics(); +if (stats == undefined) { + writefln("nbt server not running"); +} else { + simple_table(stats); +} +%> + +<% page_footer(); %> diff --git a/swat/nbt_server/menu.js b/swat/nbt_server/menu.js new file mode 100644 index 0000000000..fd445bf861 --- /dev/null +++ b/swat/nbt_server/menu.js @@ -0,0 +1,4 @@ +/* show a menu for the esp test pages */ +simple_menu( + "NBT Server", + "Statistics", session_uri("/nbt_server/index.esp")); |