Skip to content

Commit

Permalink
Fixed incorrect invokerId being used for setlevel history
Browse files Browse the repository at this point in the history
  • Loading branch information
Timo Smit committed Mar 15, 2017
1 parent 370ec98 commit 87950f3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions luamods/wolfadmin/admin/admin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ function admin.kickPlayer(victimId, invokerId, reason)
et.trap_DropClient(victimId, "You have been kicked, Reason: "..(reason and reason or "kicked by admin"), 0)
end

function admin.setPlayerLevel(clientId, level, adminId)
local playerid = db.getplayer(players.getGUID(clientId))["id"]
local adminid = db.getplayer(players.getGUID(clientId))["id"]
function admin.setPlayerLevel(clientId, level, invokerId)
local playerId = db.getplayer(players.getGUID(clientId))["id"]
local invokerPlayerId = db.getplayer(players.getGUID(invokerId))["id"]

db.updateplayerlevel(playerid, level)
db.addsetlevel(playerid, level, adminid, os.time())
db.updateplayerlevel(playerId, level)
db.addsetlevel(playerId, level, invokerPlayerId, os.time())
end

function admin.onconnectattempt(clientId, firstTime, isBot)
Expand Down

0 comments on commit 87950f3

Please sign in to comment.