forked from FAForever/fa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathonlineprovider.lua
34 lines (28 loc) · 1.09 KB
/
onlineprovider.lua
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
--*****************************************************************************
--* File: lua/multiplayer/onlineprovider.lua
--* Author: Sam Demulling
--* Summary: 3rd party integration options. This will receive and send commands
--* by hooking into stdin/out in the supremecommander app.
--*
--* Copyright © 2006 Gas Powered Games, Inc. All rights reserved.
--*****************************************************************************
-- Called from C++ code when we are launching from gpg.net.
function CreateLobby(autolaunch, protocol, port, playerName, uid, natTraversalProvider, hasSupcom)
local lobbyfile
if autolaunch then
lobbyfile = '/lua/ui/lobby/autolobby.lua'
else
lobbyfile = '/lua/ui/lobby/lobby.lua'
end
lobby = import(lobbyfile)
if not lobby then
error("Could not load " .. repr(lobbyfile))
end
if hasSupcom == 0 then
hasSupcom = false
else
hasSupcom = true
end
lobby.CreateLobby(protocol, port, playerName, uid, natTraversalProvider, GetFrame(0), ExitApplication, hasSupcom)
return lobby
end