disconn.lua
Script run on each xb-lua detach event
export XB_LUA_TPLOG_INIT=="@/path-to/disconn.lua"