#!/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)