mIRC Homepage
Posted By: Johan_NL Multiserver timer problem - 14/10/03 02:28 PM
Hi there,

I'm trying to write a simple away addon that supports multiple servers but somehow i got stuck on the timer part for the autoidle checker. Here's the problem:

I want to check $idletime, and as soon as it passes a certain value (say 30 mins) i want the script to set me to /away. I can get that done, no problem. But when I connect to another server in the meantime and I idle on the first server then it either sets me away on the first server and tells people im away on the other server as well, or it sets me away on both servers. Of course this bugs me to hell and back: it just doesnt work properly. mad

Now I would like to know: what do I do to make this work on not one or two but every network I connect to, and do I use multiple timers or just one timer to check every connection ? And do you people have any simplified examples to show me how it's done ? confused

I know must sound a bit lame to ask such a question, but you know how that is: you been scripting for a while and you know it's all in the help files but you keep reading and reading and you cant see the forrest through the trees anymore. Massive input overload, so to say frown

Anyway, I hope this will get me back on track. A BIG thanks in advance,

Johan_NL smile
Posted By: KingTomato Re: Multiserver timer problem - 14/10/03 02:44 PM
$scid($activecid).idle <-- Idle time on current server. Use $scon and $scid for multi-server functions.

EDIT: Additional, use the -o switch on a timer to make it "offline" meaning it will work globally amoung all server windows. >:D

on *:INPUT:#: {
.timerawayidle -o 0 500 /away Auto-Away after 30 minutes
}
Posted By: Johan_NL Re: Multiserver timer problem - 14/10/03 02:53 PM
Okay, thanks a lot ! Lemmie go see if i can get it to work this round laugh

Johan_NL smile

© mIRC Discussion Forums