Advertisement
Seb

Auto away

Seb
Sep 10th, 2011
911
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.77 KB | None | 0 0
  1. ;Auto away on idle script
  2. ;Simple and effective
  3. ;#mircscripting @ undernet
  4.  
  5.  
  6. alias idlechk {
  7.   if (!$away) {
  8.     tokenize 32 $1
  9.     if ($1 == ->) { if ($3 == ISON) {
  10.         if ($idle >= 3600) {
  11.           scon -a away Away since $fulldate - Leave a message or email seb[at]ircpros.net
  12.           echo $color(notice) -a [/away] You just have been set away - $fulldate
  13.           set %awaytime $ctime
  14.         }
  15.       }
  16.     }
  17.   }
  18. }
  19. on *:START: {
  20.   debug -i idle.chk idlechk
  21. }
  22.  
  23. on *:input:*:{
  24.   if (!$away) { return }
  25.   if ($away) {
  26.     if ($left($1,1) == $chr(47)) { return }
  27.     scon -a away
  28.     $iif(%awaytime,echo $color(notice) -a [/away] You were gone for: $duration($calc($ctime - %awaytime)),return)
  29.     unset %awaytime
  30.   }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement