Script to block wifi users
 

Script to block wifi users

Started by Bonecrusher, 19 January, 2014, 18:04:43

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bonecrusher

I'm a hub admin and wifi users with low download speeds take up the upload slots thus slowing down the hub. Is there any script to block them?

PPK

Users with slow connection have zero effect on hub performance, they can't slow hub down ...
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Bonecrusher

Sorry, i meant to say that  users on lan keep complaining that they can't get slots from me and the other admins as the wifi users take up all the slots and download at a snail's pace.... :(

PPK

Ok. But here is problem how to identify slow user... They can set in client any connection type as they want and hub have zero information about real user connection speed :(
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Bonecrusher

Ya...that's the problem i faced when trying to make a script...i couldn't find the valueid for userdata call that identifies IPv6 users...if some one can tell me which function or valueid to call to detect IPv6 connections i will be grateful...

PPK

That is easy, simply check tUser.sIP  ;)
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Bonecrusher

How can I tell if the user is on wifi from user ip...Both lan users and wifi users have ips as 192.168.XXX.XXX... <_<

PPK

"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Bonecrusher

So,basically there is no way to tell IPv4 users from IPv6 users!!!.... :huh:

PPK

You don't see any difference between IPv4 address and IPv6 address ?  :huh:
IPv4: 89.102.88.61
IPv6: 2a01:8c00:ff00:8120:21f:d0ff:feb5:e535
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Bonecrusher

ya i know it should be like that but when i type !getuserinfo for wifi users they show their ips as 192.168.XXX.XXX....which function of ptokax do i use to get the ip's in that format?

PPK

Then they a ) have clients without ipv6 support or b ) connected directly to hub ipv4 address. Because when they use IPv6 then in !getuserinfo will be IPv6 address as first...
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

PPK

Example how it looks
Quote[22:21:20] <_@o'>
Nick: PPK
Profile: Master
Status: Online from St 15. leden 2014, 12:59:58 CET
IP: 2a01:8c00:ff00:8120:21f:d0ff:feb5:e535 / 89.102.88.61
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Bonecrusher

Most of the students in my college use either Apex DC++ or plain old DC++ to connect. Do u mean to say in -- b)connected directly to hub ipv4 address-- that they use direct connection to connect to my hub?...I'm running my hub on lan only btw. Anyways thanks for all the help!!... :)

PPK

Well that explain it all. Apex and DC++ use only IPv4 for nmdc hubs  :(
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

SMF spam blocked by CleanTalk