PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: TTB on 05 April, 2005, 20:00:35

Title: Offline Timeban
Post by: TTB on 05 April, 2005, 20:00:35
I don't know if it is possible, but can a Timeban also be done when a user is offline? It should be done by IP >> TimeBan(IP, TimeInMinutes)... was just wondering.

If it can be done, can someone give it a try?

I have this for so far:

function ToArrival(user, data)
s,e,whoTo = string.find(data,"$To:%s+(%S+)")
if (whoTo == botname) then
s,e,whoTo,from,cmd = string.find(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(%S+)")
if (cmd == cmd2) and user.bOperator then
local s,e,whoTo,from,cmd,nick,time,reason = string.find(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(%S)+%s+(%d*).(%d*).(%d*).(%d*)+%s+(%d+)+%s+(%S*)")
if nick ~= nil and time ~= nil and reason ~= nil then
TimeBan(nick, time)
user:SendPM(botname, "Test complete!")
return 1
else
user:SendPM(botname, "Syntax error: "..cmd2.." ")
return 1
end
end
end
end

It doesn't work yet, but maybe it is impossible... so that's why I post it. If it can be done, maybe someone can make the code work.
Title:
Post by: jiten on 05 April, 2005, 21:39:08
Why don't u use PtokaX's inbuild command !tempban?

!tempban

Best regards,

jiten
Title:
Post by: TTB on 05 April, 2005, 23:04:05
QuoteOriginally posted by jiten
Why don't u use PtokaX's inbuild command !tempban?

This is why >> *** Error: Can't tempban 145.52.1.1 - user is not online.
I want to tempban also offline users...
Title:
Post by: TTB on 07 April, 2005, 21:35:52
Someone who can help me? Maybe I should post this request in the threat were we can request any features in the new ptokax... Maybe it can be done also by script, so maybe knows how...?!