PtokaX forum

Development Section => LUA & PtokaX-Scripting-Interface => Topic started by: Corayzon on 19 June, 2004, 02:37:45

Title: Unban Update Request
Post by: Corayzon on 19 June, 2004, 02:37:45
now here my thoughts:-

the Unban function doesnt return any info at all depending on how it proformed.

what i mean is, i would like ptokax's Unban function to return 1 when a banned user is unbanned and nil when it didnt find the user to unban...

this could save alot of processing because scripts wouldnt have to use function like this...

function checkBanned(sUsername)
readfrom("../PermBan.dat")
while 1 do
local sLine = read()
if sLine == nil or sLine == "" then
readfrom()
return
else
local _,_, sExpression = strfind(sLine, "(%S+)|")
if sExpression ~= nil then
if strlower(sExpression) == strlower(sUsername) then
readfrom()
return 1
end
end
end
end
end

to check if the user is banned. i hope this is added to the final release of ptokax!

noza