--//RangeBlaster v2.02 by Phatty --//Ip Keys Written by (uk-kingdom)John --//Memory based, will be tweaking soon, to make faster ;) --//Much faster now done in dataarival so less bandiwdth used for bad user ;) Bot = "RangeBlaster" Ranges = {} function Main() frmHub:RegBot(Bot) LoadIps() end function LoadIps() local handle = openfile("RangeBlaster/Ranges.dat","r") line = read(handle) while line do local s,e,range,ipr1,ipr2 = strfind(line,"$(%S+)$|(%S+)|(%S+)") --range may be used later on in development Ranges[ipr1] = ipr2 line = read(handle) end end function Blocked(userip) local s,e,range1,range2,range3,range4 = strfind(userip,"(%d+).(%d+).(%d+).(%d+)") for i,p in Ranges do local s,e,ipa1,ipb1,ipc1,ipd1 = strfind(i, "(%d*).(%d*).(%d*).(%d*)") local s,e,ipa2,ipb2,ipc2,ipd2 = strfind(p, "(%d*).(%d*).(%d*).(%d*)") if range1 == ipa1 then 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 return 1 end end end end end end end function DataArrival(user,data) if strsub(data, 1, 13) == "$ValidateNick" then if Blocked(user.sIP) == 1 then user:SendData(Bot, "This hub is private, you will now be disconnected!") user:SendData(Bot, "Disconnecting...") SendPmToOps(Bot, user.sName.." - "..user.sIP.." has been blasted by "..Bot.."!") user:Ban() end end end