PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: Dessamator on 02 April, 2005, 18:41:57

Title: Tempban time Checker
Post by: Dessamator on 02 April, 2005, 18:41:57
--Tempban time Checker for ptokax 16.09
--By Dessamator

sBot=frmHub.GetHubBotName()
function ChatArrival(user, data)
data = string.sub(data,1,string.len(data)-1)
s,e,cmd = string.find(data, "%b<>%s+(%S+)")
if (string.lower(cmd) == "!btime") then
GetTbantime(user,data)
return 1

end
end
ToArrival = ChatArrival

function GetTbantime(user,data)
local s,e,input = string.find(data, "%b<>%s+%S+%s+(.+)")

if not(input==nil) and GetTempBannedItemTime(input) then
user:SendPM(sBot,"The current bantime for user with ip:"..input.." is "..GetTempBannedItemTime(input).." minutes")

elseif not(input==nil) and GetTempBannedItemIp(input) then

local bantime=GetTempBannedItemTime(GetTempBannedItemIp(input))
user:SendPM(sBot,"The current bantime for "..input.." is "..bantime.." minutes")
else
user:SendData("Syntax Error. Correct Syntax is : !btime ")
end

end
 
Title:
Post by: jiten on 03 April, 2005, 11:10:31
Keep it coming dessamator!

P.S. So u really did it  :D
Title:
Post by: Dessamator on 03 April, 2005, 14:52:34
QuoteKeep it coming dessamator!

P.S. So u really did it  :D
 
hehe, yap as i said very simple, the only thing that was bugging me was the "if part",  :D
Title:
Post by: jiten on 03 April, 2005, 16:18:10
Indeed  :]