summaryrefslogtreecommitdiff
path: root/standalone_server.lua
diff options
context:
space:
mode:
Diffstat (limited to 'standalone_server.lua')
-rwxr-xr-xstandalone_server.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/standalone_server.lua b/standalone_server.lua
new file mode 100755
index 0000000..a1dd571
--- /dev/null
+++ b/standalone_server.lua
@@ -0,0 +1,20 @@
+#!/usr/bin/env lua5.1
+local server = require("server")
+
+local srv = server.create()
+local started = false
+
+while true do
+ server.update(srv)
+ local status, invite = server.match_status(srv)
+
+ if status == "fail" then
+ print("failed to register match (match server down?)")
+ break
+ elseif status == "active" and not started then
+ started = true
+ print("invite: " .. invite)
+ end
+end
+
+server.close(srv)