Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix "vRP/add_identifier" ignore ip check.
  • Loading branch information
Imagic committed Aug 16, 2017
1 parent a8ba7f8 commit 146b71c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vrp/base.lua
Expand Up @@ -133,7 +133,9 @@ function vRP.getUserIdByIdentifiers(ids, cbr)
local user_id = rows[1].id
-- add identifiers
for l,w in pairs(ids) do
MySQL.query("vRP/add_identifier", {user_id = user_id, identifier = w})
if not config.ignore_ip_identifier or (string.find(w, "ip:") == nil) then -- ignore ip identifier
MySQL.query("vRP/add_identifier", {user_id = user_id, identifier = w})
end
end

task({user_id})
Expand Down

1 comment on commit 146b71c

@CabelinDev
Copy link

@CabelinDev CabelinDev commented on 146b71c Jul 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I managed to fix this problem with this.

resources\vrp\base.lua at line 87;

previously:
vRP.prepare("vRP/create_user","INSERT INTO vrp_users(whitelisted,banned) VALUES(false,false); SELECT LAST_INSERT_ID() AS id")

after:
vRP.prepare("vRP/create_user","INSERT INTO vrp_users(whitelisted,banned,last_login,ip) VALUES(false,false,false,false); SELECT LAST_INSERT_ID() AS id")

Please sign in to comment.