| Message |
Yes, that is pretty easy to do.
You could make a plugin, and in it put a handler for OnPluginCommandEntered. In that you could remember the time of the last command actually typed (for going AFK).
Then you could make a timer that checks the time now, compared to the time of the last command. That timer could fire every minute. Of course, the same timer can send something to keep the connection alive as well.
In fact, you can use OnPluginSent to find the last time something was sent to the MUD, and thus not send your "keep alive" if something else was sent recently.
I don't know about the dialog box, because it would sit there waiting for you to press OK, and thus not drop the connection. But, you could play a sound, display a message in red, and if you don't type anything in the next minute, drop the connection. Of course, typing anything should cancel the timeout anyway. Thus all you really need to do is something like, at > 60 minutes but < 61 minutes, display the message, and > 61 minutes, drop the connection. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|