Small fixes

This commit is contained in:
Maxim Khomutov 2023-07-26 18:41:37 +03:00
parent cdeacc16bf
commit f1ab07d49a
2 changed files with 3 additions and 4 deletions

View File

@ -303,10 +303,10 @@ class Core:
ev.call_event("onServerStopped") ev.call_event("onServerStopped")
await ev.call_async_event("onServerStopped") await ev.call_async_event("onServerStopped")
await self.__gracefully_kick() await self.__gracefully_kick()
if config.Options['use_lua']:
ev.call_event("_lua_plugins_unload")
await ev.call_async_event("_plugins_unload") await ev.call_async_event("_plugins_unload")
ev.call_event("_lua_plugins_unload")
self.run = False self.run = False
self.log.info(i18n.stop) self.log.info(i18n.stop)
if config.WebAPI["enabled"]: if config.WebAPI["enabled"]:
asyncio.run(self.web_stop()) asyncio.run(self.web_stop())
# exit(0)

View File

@ -66,8 +66,6 @@ class TCPServer:
if _client.nick == client.nick and _client.guest == client.guest: if _client.nick == client.nick and _client.guest == client.guest:
await _client.kick(i18n.core_player_kick_stale) await _client.kick(i18n.core_player_kick_stale)
client.log.info(i18n.core_player_set_id.format(client.pid))
allow = True allow = True
reason = i18n.core_player_kick_no_allowed_default_reason reason = i18n.core_player_kick_no_allowed_default_reason
@ -90,6 +88,7 @@ class TCPServer:
else: else:
self.log.info(i18n.core_identifying_okay) self.log.info(i18n.core_identifying_okay)
await self.Core.insert_client(client) await self.Core.insert_client(client)
client.log.info(i18n.core_player_set_id.format(client.pid))
return True, client return True, client