simple auto away idle script

By cofvempire on Aug 23, 2011

this is my auto away script when ur on idle
u can use brb to put u away and to come back just say something in the channel
if u don't use brb it will set u away after 30 min. with the text brb
example:

brb *** you are now on away *** when u do a whois it will say: cofvempire is away: is gone from 19:45:30 and when ur back it says in the channel: i'm back after 23 sec. after idle since 19:45:30 it includs an connect and disconnect so the timer starts and halts when its needed changed: -when someone needs u in a channel while u are on away, it will auto. say: sorry, but i am away since: awaytime feel free to comment :) ```mirc on *:INPUT:#: { if ($1 == brb) { set %away.ctime $ctime set %away.since $time away i'm gone since $time } elseif ($away == $true) { say i'm back after $duration($calc($ctime - %away.ctime)) idle since %away.since away } } alias gone { if (($idle > 1800) && ($away == $false)) { say brb away i'm gone since $time } } alias taway { /timergone 0 600 /gone } on *:TEXT:*:#: { if ($away == $true) && ($me isin $1-) { say sorry, but i am away since: %away.since } } on *:CONNECT:/taway on *:DISCONNECT:/timergone off ```

Comments

Sign in to comment.
cofvempire   -  Mar 05, 2013

added on text event when u are on away

 Respond  
cofvempire   -  Aug 23, 2011

yep :) it only showed x sec. (when i was x sec. away)

 Respond  
Jethro   -  Aug 23, 2011

Have you tried:

$duration($awaytime)
$duration($nick(#,$me).idle)

 Respond  
cofvempire   -  Aug 23, 2011

i know :)
but this was more what i wanted :)
i try'd it first with $awaytime but couldn't calculate then from idle + awaytime very good. so i used this :)
the same for $nick(#,$me).idle.

maybe i missed something when i used $awaytime and $nick(#....
but this one works good either so :)

 Respond  
Jethro   -  Aug 23, 2011

There are $awaytime and $nick(#,$me).idle you can use.

 Respond  
cofvempire   -  Aug 23, 2011

oops :) tsay is from my custom theme :) edited to normal say :)
and why all timers on halt is because i use timers :) so i halt them all in this script instead of each seperated.

 Respond  
Dani_l11   -  Aug 23, 2011

why halt all timers on disconnect? just halt the one you're using.

Also, what's " tsay brb"?

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.