--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
Keep it coming dessamator!
P.S. So u really did it :D
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
Indeed :]