Idle disconnect

Post Reply
DevArrah
Posts: 51
Joined: Sat Oct 29, 2011 4:57 pm

Idle disconnect

Post by DevArrah »

I was wondering if anyone has a idle disconnect script they might be willing to share. I.e. something that dc's you from the mud when you haven't entered a command for x minutes.

Kyoshi
Posts: 11
Joined: Sat Aug 11, 2012 5:38 pm

Re: Idle disconnect

Post by Kyoshi »

Not sure how to make a script like that, but you could make a timer for x minutes and have it send "quit" to the commandline when it goes off.

User avatar
kevutian
Posts: 217
Joined: Fri Aug 20, 2010 8:18 pm
Location: United Kingdom
Contact:

Re: Idle disconnect

Post by kevutian »

Could just make a small script, hooking onto the sysDataSendRequest event.

Code: Select all

function logoutTimer()
   killTimer(logout)
   local timeout = 600 -- Timeout in seconds
   logout = tempTimer(timeout, [[disconnect()]])
end
If your game has a "proper" way to log out, i.e. in the IRE games, we type QQ, simply change to:

Code: Select all

logout = tempTimer(timeout, [[send("qq")]])
Just add that event handler to the script and give the script the name of logoutTimer.

Should do the trick.

Post Reply