alias anti.idle {
if ($idle >= 3600) { msg #channel blah blah blah
}
}
on *:connect:{
if ($server == yourserverhere) {
timer 0 10 anti.idle
}
}
...
The following code is even simpler, and can be added to the Perform section of mIRC or into an "On Connect" statement in remotes:
/timerAlive 0 500 /msg $me This is to stay alive at $!time
Naturally, some modification may be needed for multi-server use (scon etc). As per a previous thread, this could also be modified by closing the message window immediately (unless you always message yourself with other things), so that you don't even know it has been triggered! This last point is only valid if you don't send all messages to the one window.
The important difference between my snippet and Ricky's is the way I have used "msg". Ricky sends his message to the channel, I only send it to myself. Thus if anyone is sitting in the channel they can see the spurious "chat" that Ricky puts out at very regular intervals. Whether or not this is annoying depends on the chatters in the channel!
With my method, only I know (and of course the server) that these messages exist.
Oh, another difference is that I am not continually checking "$idle". This means that my timer only goes off when told. Will this impact on or improve performance? Perhaps not so anyone can notice, but it does remove a step within the code.
If your server supports it, you can also use "/notice".
Obviously, you may want to take the best of both codes. In this case, I would suggest moving the "/msg" into an alias and then calling that alias with the timer. The advantage of this is that you can insert multi-server support.
Again, the timer line goes in the "perform" or "on connect" section.
/timerAlive 0 500 myAliveMessage
alias myAlliveMessage {
; other code as required (e.g. multi-server stuff)
msg $me This is to stay alive at $time
; other code as required (e.g. close message window)
}
Cheers,
DK