mIRC Homepage
Posted By: starpossen AutoAway on idle incl. nick change - 23/05/07 01:20 AM
HI.
I've searched around but didn't quite find what I was looking for.
AutoAway on idle incl. nick change

But with no messages send to channel.
Let's say i'm idle for 30minutes, the script will then
change my nick to nick`away, and then change back to
nick when i start typing again.

Hopefully I made sense, and didn't onerlook any posts about this.
Posted By: Bekar Re: AutoAway on idle incl. nick change - 23/05/07 01:36 AM
I'm sure there's plenty of scripts around that can do this for you. I wrote one years ago that does pretty much everything you've said.. (http://www.bekar.id.au/~bekar/mirc/scripts/away.mrc)

If that's no joy, it should give you the idea of what's needed.
Posted By: RusselB Re: AutoAway on idle incl. nick change - 23/05/07 01:51 AM
The only message that has to be sent, is the nickchange message, and since that's sent from the server, there's no way to prevent it from going out (unless you omit the part of the nickchange, that is)
Posted By: starpossen Re: AutoAway on idle incl. nick change - 23/05/07 02:02 AM
Okay, what I mean is, after i've idled for like 20 minutes, my client will change my nick to nick`away, and as soon as I start typing again it will change back to nick.
Posted By: chiram Re: AutoAway on idle incl. nick change - 23/05/07 02:36 AM
Code:
alias checkidle { if ($idle >= 1200) && ($right($me,5) != `away) { nick $+($me,`away) } }

ON *:INPUT:*:{ if ($right($me,5) == `away) { nick $left($me,-5) } }

/timer 0 30 checkidle


is as close as you can get i think since on keypress only works in custom windows
Posted By: MeStinkBAD Re: AutoAway on idle incl. nick change - 23/05/07 06:51 PM
Well I'd do something like...

Code:
alias checkaway {
  if ($away) && ($right($nick,5) != 'away) { 
     /nick $+($nick,'away) 
  }
  if (!$away) && ($right($nick,5) == 'away) {
    /nick $left($nick,-5)
  }
}

/timer.awaycheck 0 1 /checkaway


Posted By: chiram Re: AutoAway on idle incl. nick change - 24/05/07 05:15 AM
your example doesn't check idle time, only if he has done /away or not.. you could change nickname based on /away using an on raw that the server sends to confirm you are set as away instead of checking with a timer. also the ' in your example isnt a valid character for nicks

i put the timer as 30 seconds in my example because it seems like a waste of resources to check every second just to decide if your nick needs `away on it or not.
© mIRC Discussion Forums