Commit fb79fbf2 authored by Jonah's avatar Jonah

fixed sql query type

parent def1556f
......@@ -168,3 +168,17 @@ function pb_canunban(steamid, ply)
return #pbSQLQuery(query, qTab) > 0
end
function pb_updateban(steamid, ply, bantime, reason, name)
local updateName = "[Unknown]"
if name and string.len(name) > 0 then
updateName = name
end
local qTab = {}
qTab.wait = false
local query = "UPDATE "..db_prefix.."bans SET ends = created + "..bantime
query = query .. ", length = "..bantime..", name = '"..propban_database:escape(updateName).."', reason = '"..propban_database:escape(reason).."' WHERE authid = '"..propban_database:escape(steamid).."' and RemoveType is null"
pbSQLQuery(query, qTab)
XGUIRefreshBans()
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment