• Welcome to Valhalla Legends Archive.
 

Automoderation - Idleban/kick

Started by Mephisto, October 22, 2004, 01:59 PM

Previous topic - Next topic

Eternal

I think this might be quite a useful threat to put in the Bot Dev References board. <go Mod go!>
^-----silly Brit
-----------------------------
www.brimd.com

Spht


Networks

oh god..
You create a timer and loop through the array of users checking each and every idle time..

LivedKrad

You create a single timer to ban users in an array? Not only is that inaccurate, it could cause problems when trying to ban (I would assume) the upperbound element of the array (the latest users). How would you ban someone in the middle if they were idle longer than the person on the end? Especially with a single timer.

shadypalm88

Quote from: LivedKrad on October 23, 2004, 08:59 PM
You create a single timer to ban users in an array? Not only is that inaccurate, it could cause problems when trying to ban (I would assume) the upperbound element of the array (the latest users). How would you ban someone in the middle if they were idle longer than the person on the end? Especially with a single timer.
Huh?  If I simply store a last action timestamp along with my array of channel users, and check through it for people that haven't done anything in the last X seconds, how is that inaccurate?  This would be trivial using clock() or GetTickCount() to create the timestamps, comparing them every so often to the current value, and if the difference is over the threshold, banning or kicking the user.  The accuracy would be as good as the timer delay.

Blaze

#20
I'd go with the event idea rather then all the other ones..

Edit:

I would count every 4 chats as one ID
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

Networks

My idleban bans any user who has exceeded the idle limit not just one user.

LivedKrad

Quote from: shadypalm88 on October 23, 2004, 09:19 PM
Quote from: LivedKrad on October 23, 2004, 08:59 PM
You create a single timer to ban users in an array? Not only is that inaccurate, it could cause problems when trying to ban (I would assume) the upperbound element of the array (the latest users). How would you ban someone in the middle if they were idle longer than the person on the end? Especially with a single timer.
Huh?  If I simply store a last action timestamp along with my array of channel users, and check through it for people that haven't done anything in the last X seconds, how is that inaccurate?  This would be trivial using clock() or GetTickCount() to create the timestamps, comparing them every so often to the current value, and if the difference is over the threshold, banning or kicking the user.  The accuracy would be as good as the timer delay.

I wasn't aware he mentioned anything so deep as to reveal anything to the nature of what you said.