Advertisement
Seb

Auto away

Seb
Sep 10th, 2011
839
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. ;seb@ircpros.net
  4. ;#mircscripting @ undernet
  5.  
  6.  
  7. alias idlechk {
  8.   if (!$away) {
  9.     tokenize 32 $1
  10.     if ($1 == ->) { if ($3 == ISON) {
  11.         if ($idle >= 3600) {
  12.           scon -a away Away since $fulldate - Leave a message or email seb[at]ircpros.net
  13.           echo $color(notice) -a [/away] You just have been set away - $fulldate
  14.           set %awaytime $ctime
  15.         }
  16.       }
  17.     }
  18.   }
  19. }
  20. on *:START: {
  21.   debug -i idle.chk idlechk
  22. }
  23.  
  24. on *:input:*:{
  25.   if (!$away) { return }
  26.   if ($away) {
  27.     if ($left($1,1) == $chr(47)) { return }
  28.     scon -a away
  29.     $iif(%awaytime,echo $color(notice) -a [/away] You were gone for: $duration($calc($ctime - %awaytime)),return)
  30.     unset %awaytime
  31.   }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement