--//RangeMaster v1.01 fixed by Phatty --//Much more todo --//Ip Keys Written by (uk-kingdom)John --//Lots of time testing by Chilla, thx mate ;) Bot = "RangeMaster" function Main() end function NewUserConnected(user) Blocked(user) end function OpConnected(user,data) Blocked(user) end function Blocked(user) local s,e,range1,range2,range3,range4 = strfind(user.sIP,"(%d+).(%d+).(%d+).(%d+)") --SendToAll(Bot,range1.." found to "..range2.." then to "..range3.." and finally "..range4) local handle = openfile("RangeMaster/Range.dat","r") line = read(handle) while line do --if (line == nil) then -- break if strfind(line, "%$"..range1.."%$") then --SendToAll(Bot,line.." was found with nick: "..user.sName) local s,e,rangerS,therest = strfind(line,"(%S+)$(.*)") --SendToAll(Bot,rangerS.." then "..therest) local s,e,ipa1,ipb1,ipc1,ipd1,ipa2,ipb2,ipc2,ipd2 = strfind(line,"(%d+).(%d+).(%d+).(%d+)|(%d+).(%d+).(%d+).(%d+)") --SendToAll(Bot,ipa1..ipb1..ipc1..ipd1..ipa2..ipb2..ipc2..ipd2) if range1 < ipa1 or range1 > ipa2 then else if range2 < ipb1 or range2 > ipb2 then else if range3 < ipc1 or range3 > ipc2 then else if range4 < ipd1 or range4 > ipd2 then else SendToAll(Bot,user.sName.." is being banned for bad ip:"..user.sIP) user:Ban() return 0 end end end end end line = read(handle) end end