mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 13:01:39 +09:00
Fixed BIG bug killing ExpGamingCore.Server/on_tick
This commit is contained in:
@@ -13,7 +13,7 @@ local Color -- FactorioStdLib.Color@^0.8.0
|
|||||||
local Sync -- ExpGamingCore.Sync@^4.0.0
|
local Sync -- ExpGamingCore.Sync@^4.0.0
|
||||||
|
|
||||||
-- Local Varibles
|
-- Local Varibles
|
||||||
local take_action = 8 -- below this number no action is taken, the first admin given warning jumps to this number
|
local take_action = 7 -- the first admin given warning jumps to this number, this case kick-warn is giving
|
||||||
local remove_warnings_time = {}
|
local remove_warnings_time = {}
|
||||||
local min_time_to_remove_warning = 18000 -- this is in ticks
|
local min_time_to_remove_warning = 18000 -- this is in ticks
|
||||||
local punishments = {
|
local punishments = {
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ end
|
|||||||
function Admin.clear_player(player,by_player)
|
function Admin.clear_player(player,by_player)
|
||||||
local player, by_player = Admin.valid_players(player,by_player)
|
local player, by_player = Admin.valid_players(player,by_player)
|
||||||
if not player then return end
|
if not player then return end
|
||||||
if Server and Admin.is_banned(player,true) == true then Server.interface(game.unban_player,true,player,by_player) end
|
if Server and Admin.is_banned(player,true) == true then Server.interface(game.unban_player,true,player) end
|
||||||
if Admin.clear_warings then Admin.clear_warings(player,by_player,true) end
|
if Admin.clear_warings then Admin.clear_warings(player,by_player,true) end
|
||||||
if Admin.clear_reports then Admin.clear_reports(player,by_player,true) end
|
if Admin.clear_reports then Admin.clear_reports(player,by_player,true) end
|
||||||
if Server and Role.has_flag(player,'is_jail') then Server.interface(Role.revert,true,player,by_player,2) end
|
if Server and Role.has_flag(player,'is_jail') then Server.interface(Role.revert,true,player,by_player,2) end
|
||||||
|
|||||||
@@ -451,7 +451,10 @@ function Server._thread:error(err)
|
|||||||
if is_type(self._error,'function') then
|
if is_type(self._error,'function') then
|
||||||
Manager.sandbox(self._error,self._env,self,err)
|
Manager.sandbox(self._error,self._env,self,err)
|
||||||
_return = true
|
_return = true
|
||||||
else error(err) end
|
else
|
||||||
|
self:close() -- no matter what happens next this thread will be closed
|
||||||
|
error('Thread Error (no handler): '..err)
|
||||||
|
end
|
||||||
return _return
|
return _return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user