diff --git a/server.py b/server.py index fec3162..66556d3 100644 --- a/server.py +++ b/server.py @@ -133,8 +133,8 @@ async def start(version): http_server = Server(version) http_runner = web.AppRunner(http_server) await http_runner.setup() - site = web.TCPSite(http_runner, '127.0.0.1', 5030) - await site.start() + http_site = web.TCPSite(http_runner, '127.0.0.1', 5030) + await http_site.start() async def shutdown(): # never really called global http_runner, http_server, http_site diff --git a/src/python.ts b/src/python.ts index 9912f65..8fa277b 100644 --- a/src/python.ts +++ b/src/python.ts @@ -125,7 +125,8 @@ export function getCurrentGame(): Promise { } export function onGameStart(gameId: number, data: any): Promise { - return server!.callPluginMethod("on_game_start", {"game_id": gameId, "data":data}); + const data2 = {appid: data.appid, display_name: data.display_name, gameid: gameId}; // Issue #17 + return server!.callPluginMethod("on_game_start", {"game_id": gameId, "data":data2}); } export function onGameStop(gameId: number | null): Promise {