PtokaX forum

Archive => Archived 4.0 boards => Finished Lua 4 scripts => Topic started by: BlazeXxX on 31 October, 2003, 03:27:23

Title: Dupe IP Kicker
Post by: BlazeXxX on 31 October, 2003, 03:27:23
A Dupe/Dble IP chekcer from Piglja

-- Start Copying from this line
-- An easy DoublesKickBot by piglja - 26/04/03
-- Added a IP script by piglja - 29/04/03. IP Allow script by Don Leon, if I remember correct...

botname = "DoubleKick"
ip={}
oAllow={}

function Main()
oAllow["127.0.0.1"]=1 --Just an example;)
end

function NewUserConnected(user)
theIP=user.sIP
local a,b,c,d=splittip(theIP)
if ip[user.sIP] == nil then
ip[user.sIP]=user.sIP
elseif ((oAllow[a]==1)or(oAllow==1)or(oAllow[c]==1)or(oAllow[d]==1)) then
else
user:Kick("No doubles allowed!!!")
end
end

function UserDisconnected(user)
ip[user.sIP]=nil
end

function splittip(IP)
r,g,a,b,c,d = strfind(IP, "(%d*).(%d*).(%d*).(%d*)")
d=a.."."..b.."."..c.."."..d
c=a.."."..b.."."..c..".*"
b=a.."."..b..".*"
a=a..".*"
return a,b,c,d
end

-- Finish Copying
Title:
Post by: plop on 31 October, 2003, 05:00:52
use this 1 with care.!
there are some isp wich use 1 ip for multiple users.
nextgentel is 1 of them.
a quick search on the vikings hub gave me 27 nicks on 1 single ip.
sad but true.

plop
Title:
Post by: klownietklowniet on 31 October, 2003, 07:30:02
That is dynamic ip for you... :-)
Title:
Post by: BlazeXxX on 31 October, 2003, 16:38:00
Hehe.. True.. I sometiems wonder how come two ppl in the same ip.. Poor ISPs , can't provide seperate IPs  :P
Title:
Post by: plop on 31 October, 2003, 19:41:48
QuoteOriginally posted by klownietklowniet
That is dynamic ip for you... :-)
no it's not dynamic @ all.
1 of the users is a operator on 1 of our hub's.
you'll see that they always are pasive as they can't change anything in the router, because the isp owns that.
the reason for this stupid thing from the isp can be or not willing 2 buy new ip's or simply not able 2 get more ip's
china is gone start using ipv6 soon as they're also nearly out of ip's.
kinda weird as you think of the fact that america own's 75% of all the ip's avail and have loads free.
selling them would solve all problems for a couple years.

plop
Title:
Post by: klownietklowniet on 01 November, 2003, 06:22:13
*offtopic*

When the ISP via DHCP provides a different ip number to it's clients, that's called a dynamic ip number.

The passive part has got nothing to do with it. Means only that the ISP has provably set restrictin on their connection, like not permiting incomming connections.

About USA having 75% of the ip numbers, I don't know that... but I think that most of the internet is povably in that part of the world. Need it there. IPv6 should solve some problems regarding limited number of ip number. A professor once said that there will be enough ip numbers for all house appliances, so even they can be online! Don't really see the use in that... but I guess something being possible is just as important... for those that really want to have their entire house online and can't get enough of HiTech stuff....