mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-11-17 03:18:33 +00:00
make a checkToken() event its own function
Several events were calling very similar check token events, so I've just moved them to one to help unify it and help future debugging
This commit is contained in:
1 parent
c745d51832
commit
4e8a15590f
3 files changed
+39
-37
No files matched your search
@@ -105,14 +105,8 @@ if isServer() then
|
||||
RegisterNetEvent(getScript()..":server:makeOXStash", function(name, label, slots, weight, owner, coords, token)
|
||||
local src = source or nil
|
||||
if src then
|
||||
debugPrint("^1Auth^7: ^2Auth token received^7, ^2checking against server cache^7..")
|
||||
if token == nil then
|
||||
debugPrint("^1Auth^7: ^1Token not received^7")
|
||||
elseif token ~= validTokens[src] then
|
||||
debugPrint("^1Auth^7: ^1Tokens don't match! ^7", token, validTokens[src])
|
||||
else
|
||||
debugPrint("^1Auth^7: ^2Client and Server Auth tokens match^7!", token, validTokens[src])
|
||||
validTokens[src] = nil
|
||||
if not checkToken(src, token, "stash", name) then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user