Double login killer with share and IP matching. Only OPs can have (1) clone in hub. Simple, effective..
Have Fun!-- ==================================================
--// DupesOFF (Double Login Killer) by GeceBekcisi
--// 30-09-2005, The final and bugless version
--// Thanks to Dessamator, bastya_elvtars and PPK
-- ==================================================
sBot = "DupesOFF" -- Bot's Name
-----------------------------------------------------
function MyINFOArrival(curUser)
if not curUser.bOperator and not curUser.bConnected then
for _,LoggedUser in frmHub:GetOnlineNonOperators() do
if curUser.sIP == LoggedUser.sIP and curUser.iShareSize == LoggedUser.iShareSize then
curUser:SendData(sBot, "Double login is not allowed in this hub")
curUser:Disconnect()
end
end
end
end
-- ==================================================
You write:
curUser:SendData(sBot, "Double login is not allowed in this hub")
yes... but if users have 2 clients with 2 different share.... he can login. I things it is not correct:
if curUser.sName ~= OnlineUsers[i]["sName"] and curUser.sIP == OnlineUsers[i]["sIP"] and curUser.iShareSize == OnlineUsers[i]["iShareSize"] then
and this is correct
if curUser.sName ~= OnlineUsers[i]["sName"] and curUser.sIP == OnlineUsers[i]["sIP"] then
and in this mode.... if user have 2 client with different share... he can't login :). I things this is correct :p
c ya bye
hmmm, and what's with the ppl who share their internet lines?
Say 3 Ppl live together and use the same Internet Router and all use DC.....then only one can get in and the others have to stay outside......so the one with the share check is better in my point of view
I own a hub for university students and many universities doesn't allow people from dormitories to have real IPs; they share only one IP. This script will only prevent double logins to a hub which has more than one port or DNS host.
Best Regards
Well done, Geceb, very simple and eficient, but u could include the local table inside the if statement , its more efficient, why create a table if u wont use it, only create it when ur sure ull need it.
and psycho, i agree with u, it has its advantages and drawbacks.
QuoteOriginally posted by Dessamator
include the local table inside the if statement
You're right, updated first post. Thanks
QuoteOriginally posted by GeceBekcisi
QuoteOriginally posted by Dessamator
include the local table inside the if statement
You're right, updated first post. Thanks
Your welcome!
It's overkill to run it on every MyINFOArrival, it's enough to run it on NewUserConnected.
If I use NewUserConnected, "This hub is running PtokaX DC Hub 0.3.3.21...." will be sent to user becore error msg.
In this case, this is the question: CPU or BW usage, which one is more important for hubowner ?
QuoteOriginally posted by GeceBekcisi
If I use NewUserConnected, "This hub is running PtokaX DC Hub 0.3.3.21...." will be sent to user becore error msg.
In this case, this is the question: CPU or BW usage, which one is more important for hubowner ?
But then use MyINFOArrival and make sure that user.bConnected is false.
Take a second look now please ;)
curUser.sName ~= OnlineUsers["sName"] is futile, since the user is offline until logging in.
Script updated in the first post.
Hola,
i was looking for simple clone script like that for a while, but this 1 dosn't work. i loged in from 2 defferent clients with defferent share from same pc and nothin happends.
also why this script usin so much memory 824 kb......huhh more than robocop use ..
thx :P
QuoteOriginally posted by witch
Hola,
i was looking for simple clone script like that for a while, but this 1 dosn't work. i loged in from 2 defferent clients with defferent share from same pc and nothin happends.
That's what it's supposed to do.
QuoteOriginally posted by witch
also why this script usin so much memory 824 kb......huhh more than robocop use ..
It has to evaluate the whole userlist every time a new user tries to log in. It is also the expected behaviour, and should not affect your hub in any way.
QuoteOriginally posted by bastya_elvtars
QuoteOriginally posted by witch
Hola,
i was looking for simple clone script like that for a while, but this 1 dosn't work. i loged in from 2 defferent clients with defferent share from same pc and nothin happends.
That's what it's supposed to do.
what u mean by that? didn't it have to disconect clones?
QuoteOriginally posted by witch
what u mean by that? didn't it have to disconect clones?
Clone=same share+same IP. Same IP is not enough, imagine 10 people behind a NAT.
QuoteOriginally posted by bastya_elvtars
Clone=same share+same IP. Same IP is not enough, imagine 10 people behind a NAT.
right, than i would really love to have script wichest disconet same ip owners no matter what share they got :D
QuoteOriginally posted by witch
QuoteOriginally posted by bastya_elvtars
Clone=same share+same IP. Same IP is not enough, imagine 10 people behind a NAT.
right, than i would really love to have script wichest disconet same ip owners no matter what share they got :D
I guess nobody here should support definitive idiotism.
QuoteI guess nobody here should support definitive idiotism.
pfiiiiiii same to u ......lol :))