Fixed minor SQLite issue

* replace escape with tonumber for an integer value
This commit is contained in:
Timo Smit 2017-01-21 12:22:09 +01:00
parent e36d70aefa
commit 839036eb23

View file

@ -292,7 +292,7 @@ end
-- mutes -- mutes
function sqlite3.addMute(victimId, invokerId, type, issued, duration, reason) function sqlite3.addMute(victimId, invokerId, type, issued, duration, reason)
cur = assert(con:execute("INSERT INTO `mute` (`victim_id`, `invoker_id`, `type`, `issued`, `expires`, `duration`, `reason`) VALUES ("..tonumber(victimId)..", "..tonumber(invokerId)..", '"..util.escape(type).."', "..tonumber(issued)..", "..tonumber(issued + duration)..", "..tonumber(duration)..", '"..util.escape(reason).."')")) cur = assert(con:execute("INSERT INTO `mute` (`victim_id`, `invoker_id`, `type`, `issued`, `expires`, `duration`, `reason`) VALUES ("..tonumber(victimId)..", "..tonumber(invokerId)..", "..tonumber(type)..", "..tonumber(issued)..", "..tonumber(issued + duration)..", "..tonumber(duration)..", '"..util.escape(reason).."')"))
end end
function sqlite3.removeMute(muteId) function sqlite3.removeMute(muteId)