PtokaX forum

Lua 5.3/5.2/5.1 Scripts (for PtokaX 0.4.0.0 and newer) => Request for scripts => Topic started by: Bonecrusher on 19 January, 2014, 18:04:43

Title: Script to block wifi users
Post by: Bonecrusher on 19 January, 2014, 18:04:43
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?
Title: Re: Script to block wifi users
Post by: PPK on 19 January, 2014, 22:39:36
Users with slow connection have zero effect on hub performance, they can't slow hub down ...
Title: Re: Script to block wifi users
Post by: Bonecrusher on 20 January, 2014, 13:36:21
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.... :(
Title: Re: Script to block wifi users
Post by: PPK on 20 January, 2014, 14:43:17
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 :(
Title: Re: Script to block wifi users
Post by: Bonecrusher on 20 January, 2014, 16:33:14
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...
Title: Re: Script to block wifi users
Post by: PPK on 20 January, 2014, 17:31:20
That is easy, simply check tUser.sIP  ;)
Title: Re: Script to block wifi users
Post by: Bonecrusher on 20 January, 2014, 21:31:46
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... <_<
Title: Re: Script to block wifi users
Post by: PPK on 21 January, 2014, 05:15:01
You can't ...
Title: Re: Script to block wifi users
Post by: Bonecrusher on 23 January, 2014, 13:01:57
So,basically there is no way to tell IPv4 users from IPv6 users!!!.... :huh:
Title: Re: Script to block wifi users
Post by: PPK on 23 January, 2014, 14:41:22
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
Title: Re: Script to block wifi users
Post by: Bonecrusher on 24 January, 2014, 19:34:27
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?
Title: Re: Script to block wifi users
Post by: PPK on 24 January, 2014, 21:51:33
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...
Title: Re: Script to block wifi users
Post by: PPK on 24 January, 2014, 22:21:48
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
Title: Re: Script to block wifi users
Post by: Bonecrusher on 25 January, 2014, 05:26:27
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!!... :)
Title: Re: Script to block wifi users
Post by: PPK on 25 January, 2014, 14:30:40
Well that explain it all. Apex and DC++ use only IPv4 for nmdc hubs  :(