mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2024-11-10 06:41:53 +00:00
Minor bugfixes regarding new players
This commit is contained in:
parent
9d4aaa7a62
commit
2d4191f03f
2 changed files with 8 additions and 5 deletions
|
@ -52,10 +52,13 @@ function admin.onconnectattempt(clientId, firstTime, isBot)
|
|||
return "\n\nIt appears you do not have a ^7GUID^9/^7etkey^9. In order to play on this server, enable ^7PunkBuster ^9(use ^7\\pb_cl_enable^9) ^9and/or create an ^7etkey^9.\n\nMore info: ^7www.etkey.org"
|
||||
end
|
||||
|
||||
local playerId = db.getplayer(guid)["id"]
|
||||
local ban = db.getBanByPlayer(playerId)
|
||||
if ban then
|
||||
return "\n\nYou have been banned for "..ban["duration"].." seconds, Reason: "..ban["reason"]
|
||||
local player = db.getplayer(guid)
|
||||
if player then
|
||||
local playerId = player["id"]
|
||||
local ban = db.getBanByPlayer(playerId)
|
||||
if ban then
|
||||
return "\n\nYou have been banned for "..ban["duration"].." seconds, Reason: "..ban["reason"]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ local cur = nil
|
|||
|
||||
-- players
|
||||
function sqlite3.addplayer(guid, ip)
|
||||
cur = assert(con:execute("INSERT INTO `player` (`guid`, `ip`) VALUES ('"..util.escape(guid).."', '"..util.escape(ip).."')"))
|
||||
cur = assert(con:execute("INSERT INTO `player` (`guid`, `ip`, `level`) VALUES ('"..util.escape(guid).."', '"..util.escape(ip).."', 0)"))
|
||||
end
|
||||
|
||||
function sqlite3.updateplayerip(guid, ip)
|
||||
|
|
Loading…
Reference in a new issue