unban.lua

main 17 lines · 592 bytes Raw
Alex Alex Commit Server upload 18/10/2026 23:38
1function onSay(player, words, param)
2 if player:getGroup():getId() < 3 then
3 return false
4 end
5
6 local resultId = db.storeQuery("SELECT `account_id`, `lastip` FROM `players` WHERE `name` = " .. db.escapeString(param))
7 if resultId == false then
8 return false
9 end
10
11 db.asyncQuery("DELETE FROM `account_bans` WHERE `account_id` = " .. result.getNumber(resultId, "account_id"))
12 db.asyncQuery("DELETE FROM `ip_bans` WHERE `ip` = " .. result.getNumber(resultId, "lastip"))
13 result.free(resultId)
14 player:sendTextMessage(MESSAGE_EVENT_ADVANCE, param .. " has been unbanned.")
15 return false
16end
17
Top