Seb icon

Auto away

Seb | PRO | 09/11/11 02:28:26 AM UTC | 0 ⭐ | 1989 👁️ | Never ⏰ | []
mIRC |

770 B

|

None

|

0 👍

/

0 👎

;Auto away on idle script
;Simple and effective
;[email protected]
;#mircscripting @ undernet
 
 
alias idlechk { 
  if (!$away) {
    tokenize 32 $1 
    if ($1 == ->) { if ($3 == ISON) { 
        if ($idle >= 3600) { 
          scon -a away Away since $fulldate - Leave a message or email seb[at]ircpros.net
          echo $color(notice) -a [/away] You just have been set away - $fulldate
          set %awaytime $ctime 
        }
      }
    } 
  } 
}
on *:START: { 
  debug -i idle.chk idlechk 
}
 
on *:input:*:{ 
  if (!$away) { return }
  if ($away) { 
    if ($left($1,1) == $chr(47)) { return }
    scon -a away 
    $iif(%awaytime,echo $color(notice) -a [/away] You were gone for: $duration($calc($ctime - %awaytime)),return)
    unset %awaytime
  } 
}

Comments