diff --git a/include/events.nut b/include/events.nut index 24e8c6d..49c21f7 100644 --- a/include/events.nut +++ b/include/events.nut @@ -30,16 +30,6 @@ addEventHandler("onBan", function(banInfo) _PyG2O_Send(data); }); -addEventHandler("onInit", function() -{ - local data = { - event = "onInit", - args = {} - } - - _PyG2O_Send(data); -}); - addEventHandler("onExit", function() { local data = { diff --git a/src/pyg2o/server.py b/src/pyg2o/server.py index b8b92f4..6f92fbc 100644 --- a/src/pyg2o/server.py +++ b/src/pyg2o/server.py @@ -36,6 +36,7 @@ class PythonWebsocketServer: ): logging.info(f'[PyG2O] Server is started at ws://{self.host}:{self.port}') PythonWebsocketServer._current_server = self + asyncio.create_task(callEvent('onInit', **{})) await self._stop_event.wait() async def stop(self):