PtokaX forum

Lua 5.3/5.2/5.1 Scripts (for PtokaX 0.4.0.0 and newer) => Request for scripts => Topic started by: TZB on 02 May, 2012, 11:34:21

Title: Disconnect inactive users.
Post by: TZB on 02 May, 2012, 11:34:21
Hello,
Mutor finally i am up with a limited hub with limited user access allowed at a time so i was thinking is there anyway we can disconnect inactive user after a set period of time,so that other users who are waiting to get in the HUB can connect.

What i was further thinking is can we have a script where we have a Limit for a user implemented but still other users can login and join the network.

Lets' assume we have a user limit to be 10 users.
So the first 10 users connecting to the network will get connected and log in as normal user using the complete access to share,download,upload,main chat.
users getting connected after the first 10 logged users will be in Que at the bottom of the user list waiting for a user to disconnect/logoff or disconnected by the same script due to inactivity for a long time.Once the user is off the next user in que gets automatically reconnected with his nick and and take the place of the disconnected user.

The users in que can still have a main chat access so that they can request for a user slot.

Hope i did explain properly.
Regards.
TZB
Title: Re: Disconnect inactive users.
Post by: bastya_elvtars on 02 May, 2012, 11:43:47
What is an 'inactive user'?
Title: Re: Disconnect inactive users.
Post by: TZB on 02 May, 2012, 12:26:28
LOL am so sorry,

I meant like users who are Idle like not uploading or downloading or using main chat.
Title: Re: Disconnect inactive users.
Post by: bastya_elvtars on 02 May, 2012, 13:37:07
You cannot tell whether a user is uploading or downloading. The hub is only aware of connection attempts between users, the download & upload go directly between them.
Title: Re: Disconnect inactive users.
Post by: TZB on 02 May, 2012, 17:38:55
so if there is no connection attempt made for like 60 minutes can the user be disconnected?
Title: Re: Disconnect inactive users.
Post by: bastya_elvtars on 03 May, 2012, 10:17:17
And what if he has been downloading/uploading for that time continously. You can never tell. For instance, if I make a connection attempt at 10AM, the hub will know nothing what happened afterwards. Moreover, this can easily be avoided by downloading a filelist every hour.
Title: Re: Disconnect inactive users.
Post by: TZB on 03 May, 2012, 12:05:40
Very True.
actually i and mutor were talking about the same script he has something up his mind and will be giving it a try lets wait and see i guess but this would be a good point to add on and think about.

+1 bastya_elvtars
Title: Re: Disconnect inactive users.
Post by: TZB on 08 May, 2012, 09:34:43
I think this is the end for this thread as the project will not be discussed any further as we are all fighting for some libs and cannot come on mutual grounds.

Thanks for your effort bastya_elvtars.
Title: Re: Disconnect inactive users.
Post by: bastya_elvtars on 08 May, 2012, 11:04:38
I'm sorry I could not help. I was thinking of different solutions, but none of them was bulletproof.
Re libs: I do not want to take part in this debate.