Fix #17 Too much game info data sent thru plugin framework

This commit is contained in:
NGnius (Graham) 2022-07-05 17:16:30 -04:00
parent 1fbfb8a743
commit c1d80a32fa
2 changed files with 4 additions and 3 deletions

View file

@ -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

View file

@ -125,7 +125,8 @@ export function getCurrentGame(): Promise<any> {
}
export function onGameStart(gameId: number, data: any): Promise<any> {
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<any> {