here a little script i wrote for my multiscript ;)
--KeikoNoAskSlotBot by Phatty
--v1.00
Bot = "Keiko"
Time = "1" --mins to be banned for
function DataArrival(user,data)
s,e,data = strfind(data, "%b<>([%a ]+)")
if( strfind(data, "have" and "slot") ) then
user:SendData(Bot,"Do not ask for slots...goodbye :o)")
user:TimeBan(Time)
SendToAll(Bot,user.sName.." was banned for "..Time.."mins for asking for a slot")
return 1
end
end
l8rr,,
-phatty
Updates dont you just luv em :o)
--KeikoNoAskSlotBot by Phatty
--v1.11
--Fixed a little error
--Added warnings
Bot = "Keiko"
Warned = {}
TimeWra = "1" --mins to be banned for on first warning
TimeWrx = "2" --mins to be banned on second warning
function DataArrival(user,data)
s,e,data = strfind(data, "%b<>([%a ]+)")
if( strfind(data, "have" and "slot") ) then
if Warned[user.sName]==nil then Warned[user.sName]=1
user:SendData(Bot,"Do not ask for slots...goodbye :o)")
user:TimeBan(TimeWra)
SendToAll(Bot,user.sName.." was banned for "..TimeWra.."mins for asking for a slot")
return 1
elseif Warned[user.sName]==1 then Warned[user.sName]=2
user:SendData(Bot,"Ive told you DO NOT ask for slots...goodbye :o)")
user:TimeBan(TimeWrx)
SendToAll(Bot,user.sName.." was banned for "..TimeWrx.."mins for asking for a slot on second warning")
return 1
elseif Warned[user.sName]==2 then Warned[user.sName]=nil
user:SendData(Bot,"Ok num nuts ive had enough of you...goodbye :o)")
user:Ban()
SendToAll(Bot,user.sName.." was banned for asking for slots on third warning")
return 1
end
end
end
enjoy ;)
l8rr,,
-phatty
nice going :)
Im off to test it. really thanks.....one question will it apply to ops too and only apply if the user write in pm?
nope it will do in main too i can change if you wish, and yep it will apply to ops too, i will edit out ;)
here is version with no aplly to ops ;)
--KeikoNoAskSlotBot by Phatty
--v1.12
--Fixed a little error
--Added warnings
--No longer allpies to ops
Bot = "Keiko"
Warned = {}
TimeWra = "1" --mins to be banned for on first warning
TimeWrx = "2" --mins to be banned on second warning
function DataArrival(user,data)
s,e,data = strfind(data, "%b<>([%a ]+)")
if( strfind(data, "have" and "slot") ) then
if not user.bOperator then
if Warned[user.sName]==nil then Warned[user.sName]=1
user:SendData(Bot,"Do not ask for slots...goodbye :o)")
user:TimeBan(TimeWra)
SendToAll(Bot,user.sName.." was banned for "..TimeWra.."mins for asking for a slot")
return 1
elseif Warned[user.sName]==1 then Warned[user.sName]=2
user:SendData(Bot,"Ive told you DO NOT ask for slots...goodbye :o)")
user:TimeBan(TimeWrx)
SendToAll(Bot,user.sName.." was banned for "..TimeWrx.."mins for asking for a slot on second warning")
return 1
elseif Warned[user.sName]==2 then Warned[user.sName]=nil
user:SendData(Bot,"Ok num nuts ive had enough of you...goodbye :o)")
user:Ban()
SendToAll(Bot,user.sName.." was banned for asking for slots on third warning")
return 1
end
end
end
end
this one you can select from main and pm or just in pm
--KeikoNoAskSlotBot by Phatty
--v1.13
--Fixed a little error
--Added warnings
--No longer applies to ops
--PM checks only
Bot = "Keiko"
mainnpm=0 --1 check pm and main, 0 will check only pm
Warned = {}
TimeWra = "1" --mins to be banned for on first warning
TimeWrx = "2" --mins to be banned on second warning
function DataArrival(user,data)
if mainnpm==1 then
s,e,data = strfind(data, "%b<>([%a ]+)")
if( strfind(data, "have" and "slot") ) then
if not user.bOperator then
if Warned[user.sName]==nil then Warned[user.sName]=1
user:SendData(Bot,"Do not ask for slots...goodbye :o)")
user:TimeBan(TimeWra)
SendToAll(Bot,user.sName.." was banned for "..TimeWra.."mins for asking for a slot")
return 1
elseif Warned[user.sName]==1 then Warned[user.sName]=2
user:SendData(Bot,"Ive told you DO NOT ask for slots...goodbye :o)")
user:TimeBan(TimeWrx)
SendToAll(Bot,user.sName.." was banned for "..TimeWrx.."mins for asking for a slot on second warning")
return 1
elseif Warned[user.sName]==2 then Warned[user.sName]=nil
user:SendData(Bot,"Ok num nuts ive had enough of you...goodbye :o)")
user:Ban()
SendToAll(Bot,user.sName.." was banned for asking for slots on third warning")
return 1
end
end
end
else
if(strsub(data, 1, 4) == "$To:") then
s,e,data = strfind(data, "%b<>([%a ]+)")
if( strfind(data, "have" and "slot") ) then
if not user.bOperator then
if Warned[user.sName]==nil then Warned[user.sName]=1
user:SendData(Bot,"Do not ask for slots...goodbye :o)")
user:TimeBan(TimeWra)
SendToAll(Bot,user.sName.." was banned for "..TimeWra.."mins for asking for a slot")
return 1
elseif Warned[user.sName]==1 then Warned[user.sName]=2
user:SendData(Bot,"Ive told you DO NOT ask for slots...goodbye :o)")
user:TimeBan(TimeWrx)
SendToAll(Bot,user.sName.." was banned for "..TimeWrx.."mins for asking for a slot on second warning")
return 1
elseif Warned[user.sName]==2 then Warned[user.sName]=nil
user:SendData(Bot,"Ok num nuts ive had enough of you...goodbye :o)")
user:Ban()
SendToAll(Bot,user.sName.." was banned for asking for slots on third warning")
return 1
end
end
end
end
end
end
l8rr,,
-phatty
here a little better
--KeikoNoAskSlotBot by Phatty
--v1.14
--Fixed a little error
--Added warnings
--No longer applies to ops
--PM checks only
--Minor optimisation
Bot = "Keiko"
mainnpm=0 --1 check pm and main, 0 will check only pm
Warned = {}
TimeWra = "1" --mins to be banned for on first warning
TimeWrx = "2" --mins to be banned on second warning
function DataArrival(user,data)
s,e,data = strfind(data, "%b<>([%a ]+)")
if( strfind(data, "have" and "slot") ) then
if mainnpm==1 then
if not user.bOperator then
if Warned[user.sName]==nil then Warned[user.sName]=1
user:SendData(Bot,"Do not ask for slots...goodbye :o)")
user:TimeBan(TimeWra)
SendToAll(Bot,user.sName.." was banned for "..TimeWra.."mins for asking for a slot")
return 1
elseif Warned[user.sName]==1 then Warned[user.sName]=2
user:SendData(Bot,"Ive told you DO NOT ask for slots...goodbye :o)")
user:TimeBan(TimeWrx)
SendToAll(Bot,user.sName.." was banned for "..TimeWrx.."mins for asking for a slot on second warning")
return 1
elseif Warned[user.sName]==2 then Warned[user.sName]=nil
user:SendData(Bot,"Ok num nuts ive had enough of you...goodbye :o)")
user:Ban()
SendToAll(Bot,user.sName.." was banned for asking for slots on third warning")
return 1
end
end
end
else
if(strsub(data, 1, 4) == "$To:") then
s,e,data = strfind(data, "%b<>([%a ]+)")
if( strfind(data, "have" and "slot") ) then
if not user.bOperator then
if Warned[user.sName]==nil then Warned[user.sName]=1
user:SendData(Bot,"Do not ask for slots...goodbye :o)")
user:TimeBan(TimeWra)
SendToAll(Bot,user.sName.." was banned for "..TimeWra.."mins for asking for a slot")
return 1
elseif Warned[user.sName]==1 then Warned[user.sName]=2
user:SendData(Bot,"Ive told you DO NOT ask for slots...goodbye :o)")
user:TimeBan(TimeWrx)
SendToAll(Bot,user.sName.." was banned for "..TimeWrx.."mins for asking for a slot on second warning")
return 1
elseif Warned[user.sName]==2 then Warned[user.sName]=nil
user:SendData(Bot,"Ok num nuts ive had enough of you...goodbye :o)")
user:Ban()
SendToAll(Bot,user.sName.." was banned for asking for slots on third warning")
return 1
end
end
end
end
end
end
-phatty
i get a bunch of:
Syntax Error: bad argument #1 to `strfind' (string expected, got nil)
can you look in too it? im testing the last one
I think it a stupid idea to have such a bot.... if u do not allow to ask for a slot then no1 can download anything... thats stupid.... :(
It's not stupid when you got 20 PM's when you get back from work and when closing them the same ppl is asking for a slot 30 minutes later.
But i am going to use a TimeAd in my hub telling ppl : If you got no reply in the first Pm dont nagg about it no more.
The queue is there for a reason
Ron
yepp, get HUGE pm:s about open slots, and almost everyone isnt in the hub when i get back.
Do ppl think we are made for granting 10-20 users with slots? well, i really need it anyway in my hub, problably we got some good sharing :)
btw the Version 1.13 seems to work, i hope you can sort it out with the last update (uk-kingdom)pH?tt?
ko and i got a little few more updates too ;)
ok shud be fixed with a little extra ;)
--KeikoNoAskSlotBot by Phatty
--v1.16
--Fixed a little error
--Added warnings
--No longer applies to ops
--PM checks only
--Minor optimisation
--Added Timed Advert
Bot = "Keiko"
mainnpm=1 --1 check pm and main, 0 will check only pm
Warned = {}
TimeWra = "1" --mins to be banned for on first warning
TimeWrx = "2" --mins to be banned on second warning
function Main()
SetTimer(600000)
StartTimer()
end
function OnTimer()
SendToAll("---------=====================================================----")
SendToAll(Bot,"..///DO NOT ask for slots in this hub, YOU WILL be kicked\\\..")
SendToAll("---------=====================================================----")
end
function DataArrival(user,data)
if( strfind(data, "have" and "slot",1,1)) then
if mainnpm==1 then
if not user.bOperator then
if Warned[user.sName]==nil then Warned[user.sName]=1
user:SendData(Bot,"Do not ask for slots...goodbye :o)")
user:TimeBan(TimeWra)
SendToAll(Bot,user.sName.." was banned for "..TimeWra.."mins for asking for a slot")
return 1
elseif Warned[user.sName]==1 then Warned[user.sName]=2
user:SendData(Bot,"Ive told you DO NOT ask for slots...goodbye :o)")
user:TimeBan(TimeWrx)
SendToAll(Bot,user.sName.." was banned for "..TimeWrx.."mins for asking for a slot on second warning")
return 1
elseif Warned[user.sName]==2 then Warned[user.sName]=nil
user:SendData(Bot,"Ok num nuts ive had enough of you...goodbye :o)")
user:Ban()
SendToAll(Bot,user.sName.." was banned for asking for slots on third warning")
return 1
end
end
end
else
if(strsub(data, 1, 4) == "$To:") then
if( strfind(data, "have" and "slot",1,1) ) then
if not user.bOperator then
if Warned[user.sName]==nil then Warned[user.sName]=1
user:SendData(Bot,"Do not ask for slots...goodbye :o)")
user:TimeBan(TimeWra)
SendToAll(Bot,user.sName.." was banned for "..TimeWra.."mins for asking for a slot")
return 1
elseif Warned[user.sName]==1 then Warned[user.sName]=2
user:SendData(Bot,"Ive told you DO NOT ask for slots...goodbye :o)")
user:TimeBan(TimeWrx)
SendToAll(Bot,user.sName.." was banned for "..TimeWrx.."mins for asking for a slot on second warning")
return 1
elseif Warned[user.sName]==2 then Warned[user.sName]=nil
user:SendData(Bot,"Ok num nuts ive had enough of you...goodbye :o)")
user:Ban()
SendToAll(Bot,user.sName.." was banned for asking for slots on third warning")
return 1
end
end
end
end
end
end
now a timed advert too ;)
l8rr,,
-phatty
little switch to switch on and off the timed add ;)
--KeikoNoAskSlotBot by Phatty
--v1.17
--Fixed a little error
--Added warnings
--No longer applies to ops
--PM checks only
--Minor optimisation
--Added Timed Advert
--Timed add switch
Bot = "Keiko"
mainnpm = 1 --1 check pm and main, 0 will check only pm
TimeAd = 1 --0 will switch off the timed add
Warned = {}
TimeWra = "1" --mins to be banned for on first warning
TimeWrx = "2" --mins to be banned on second warning
function Main()
SetTimer(600000)
StartTimer()
end
function OnTimer()
if TimedAd == 1 then
SendToAll("---------=====================================================----")
SendToAll(Bot,"..///DO NOT ask for slots in this hub, YOU WILL be kicked\\\..")
SendToAll("---------=====================================================----")
end
end
function DataArrival(user,data)
if( strfind(data, "have" and "slot",1,1)) then
if mainnpm==1 then
if not user.bOperator then
if Warned[user.sName]==nil then Warned[user.sName]=1
user:SendData(Bot,"Do not ask for slots...goodbye :o)")
user:TimeBan(TimeWra)
SendToAll(Bot,user.sName.." was banned for "..TimeWra.."mins for asking for a slot")
return 1
elseif Warned[user.sName]==1 then Warned[user.sName]=2
user:SendData(Bot,"Ive told you DO NOT ask for slots...goodbye :o)")
user:TimeBan(TimeWrx)
SendToAll(Bot,user.sName.." was banned for "..TimeWrx.."mins for asking for a slot on second warning")
return 1
elseif Warned[user.sName]==2 then Warned[user.sName]=nil
user:SendData(Bot,"Ok num nuts ive had enough of you...goodbye :o)")
user:Ban()
SendToAll(Bot,user.sName.." was banned for asking for slots on third warning")
return 1
end
end
end
else
if(strsub(data, 1, 4) == "$To:") then
if( strfind(data, "have" and "slot",1,1) ) then
if not user.bOperator then
if Warned[user.sName]==nil then Warned[user.sName]=1
user:SendData(Bot,"Do not ask for slots...goodbye :o)")
user:TimeBan(TimeWra)
SendToAll(Bot,user.sName.." was banned for "..TimeWra.."mins for asking for a slot")
return 1
elseif Warned[user.sName]==1 then Warned[user.sName]=2
user:SendData(Bot,"Ive told you DO NOT ask for slots...goodbye :o)")
user:TimeBan(TimeWrx)
SendToAll(Bot,user.sName.." was banned for "..TimeWrx.."mins for asking for a slot on second warning")
return 1
elseif Warned[user.sName]==2 then Warned[user.sName]=nil
user:SendData(Bot,"Ok num nuts ive had enough of you...goodbye :o)")
user:Ban()
SendToAll(Bot,user.sName.." was banned for asking for slots on third warning")
return 1
end
end
end
end
end
end
-phatty
is it possible to make the script only apply to ops?
i mean do not ask ops for slots.....
So regular users can ask others, but no ops...
Good idea, but I suggest you change the triggers "have" and "slot" to something like "can" "have" "slot." Lets say someone was looking for a file, and they found only users with no slots, and asked in the man chat if anyone had it that did have open slots. when someone replied, "I have a slot, " they would of course be banned. If someone uses "can" most likely they are asking a question and not making a statement, which cuts down on unfair bans ;)
yes true, i will sort it asap, bit bizzy atm....:(