mIRC Home    About    Download    Register    News    Help

Print Thread
AutoAway on idle incl. nick change #177292 23/05/07 01:20 AM
Joined: Oct 2005
Posts: 98
S
starpossen Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Oct 2005
Posts: 98
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.

Re: AutoAway on idle incl. nick change [Re: starpossen] #177294 23/05/07 01:36 AM
Joined: Dec 2002
Posts: 503
B
Bekar Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
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.

Re: AutoAway on idle incl. nick change [Re: starpossen] #177295 23/05/07 01:51 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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)

Re: AutoAway on idle incl. nick change [Re: RusselB] #177296 23/05/07 02:02 AM
Joined: Oct 2005
Posts: 98
S
starpossen Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Oct 2005
Posts: 98
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.

Re: AutoAway on idle incl. nick change [Re: starpossen] #177298 23/05/07 02:36 AM
Joined: May 2007
Posts: 23
C
chiram Offline
Ameglian cow
Offline
Ameglian cow
C
Joined: May 2007
Posts: 23
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

Re: AutoAway on idle incl. nick change [Re: chiram] #177341 23/05/07 06:51 PM
Joined: Apr 2003
Posts: 342
M
MeStinkBAD Offline
Fjord artisan
Offline
Fjord artisan
M
Joined: Apr 2003
Posts: 342
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




Beware of MeStinkBAD! He knows more than he actually does!
Re: AutoAway on idle incl. nick change [Re: MeStinkBAD] #177373 24/05/07 05:15 AM
Joined: May 2007
Posts: 23
C
chiram Offline
Ameglian cow
Offline
Ameglian cow
C
Joined: May 2007
Posts: 23
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.