Ok i made it slightly more configurable, "slightly" being the keyword

Code:
;
;Usage /Auto.GIAAN 
; * starts a 10 minute timer for all channels Grey.Idle.And.Away.Nicks check
;
alias Auto.GIAAN { .timer.Auto.GIAAN 0 600 Grey.Idle.And.Away.Nicks | Grey.Idle.And.Away.Nicks }

;
;Usage /Grey.Idle.And.Away.Nicks <channel> <channel> <channel> ...
; * Entering <channel> values well limit the scope of the sweep to said <channel(s)>
; * Not entering any <channels> well default to ALL channels you are on
;
; * Due to the nature of the cnick list launching this script on multiple servers has unpredictable results
;
alias Grey.Idle.And.Away.Nicks {
  ;;;;window -e -t30,60,70,80,90,100 @cp1 | aline @cp1  $+ $str(=,$len(- $date - $time -)) | aline @cp1 - $date - $time - | aline @cp1  $+ $str(-,$len(- $date - $time -))  
  ;
  var %include.nicks = hvr          | ;<---[ Include field (1st aohvr) of $nick(channel,N,aohvr,aohvr) see /help nick and address identifiers ]
  var %exclude.nicks = o            | ;<---[ Exclude field (2nd aohvr) of $nick(channel,N,aohvr,aohvr) see /help nick and address identifiers ]
  var %idle.time.freshhold = 600    | ;<---[ I think we can all gather you adjust this to your liking ]
  var %monitor.away.status = $false | ;<---[ If you want or dont want to use away status checking also ] * OP's can detect your WHOIS commands
  ;
  var %whois.count = 0
  var %m = $chan(0) | if ($0) { var %m =  $0 }
  var %channels     | if ($0) { var %channels = $1- }
  var %i = 1
  while (%i <= %m) {
    var %channel = $gettok($($+($,%i),2) $chan(%i),1,32)
    ;
    var %x = $nick(%channel,0,$+(%include.nicks,-),$+(%exclude.nicks,-)) 
    ;;;;aline @CP1  $+ %channel $chr(9) ********** $chr(9) * $chr(9) * $chr(9) * $chr(9) $iif(%x,%x,0)
    while (%x) {
      var %nick = $nick(%channel,%x,$+(%include.nicks,-),$+(%exclude.nicks,-))
      var %idle = $nick(%channel,%x,$+(%include.nicks,-),$+(%exclude.nicks,-)).idle
      ;;;;aline @CP1 %channel $chr(9) %nick $chr(9) %idle $chr(9) $cnick(%nick).color $chr(9) %cnick. [ $+ [ %nick ] ] $chr(9)
      if (%idle >= %idle.time.freshhold) {
        ;
        if ($cnick(%nick).color != 14) {
          if ($cnick(%nick)) { set %cnick. [ $+ [ %nick ] ] $cnick(%nick).color }
          else               { unset %cnick. [ $+ [ %nick ] ]                   }
          .cnick %nick 14
        }
      }
      else {
        if ($cnick(%nick).color == 14) {
          if ($var(%cnick. [ $+ [ %nick ] ] ,1)) { .cnick %nick %cnick. [ $+ [ %nick ] ] | unset %cnick. [ $+ [ %nick ] ] }
          else                                   { .cnick -r %nick }
        }
        if (%monitor.away.status = $true) {
          if (!$timer($+(.whois.,%nick))) {
            inc %whois.count
            .timer $+ $+(.whois.,%nick) 1 %whois.count whois $!( $+ %nick $+ ,)
          }
        }
      }
      dec %x
    }
    inc %i
  }
  if (%monitor.away.status = $true) {
    if (%whois.count) {
      .enable #GIAAN.WHOIS.RAWS
      inc %whois.count
      .timer.whois.#GIAAN.WHOIS.RAWS 1 %whois.count whois disable.#GIAAN.WHOIS.RAWS
      .timer.whois.disable.#GIAAN.WHOIS.RAWS 1 $calc(%whois.count + 60) .disable #GIAAN.WHOIS.RAWS
    }
  }
}

;
#GIAAN.WHOIS.RAWS off
raw 301:*:{
  haltdef
  var %nick = $$2
  if ($cnick(%nick).color != 14) {
    if ($cnick(%nick)) { set %cnick. [ $+ [ %nick ] ] $cnick(%nick).color }
    else               { unset %cnick. [ $+ [ %nick ] ] }
    .cnick %nick 14
  }
}
raw 318:*:{ haltdef | if ($2 == disable.#GIAAN.WHOIS.RAWS) { .timer.whois.disable.#GIAAN.WHOIS.RAWS off | .disable #GIAAN.WHOIS.RAWS } }
;
raw 302:*:{ haltdef }
raw 303:*:{ haltdef }
raw 304:*:{ haltdef }
raw 305:*:{ haltdef }
raw 306:*:{ haltdef }
raw 307:*:{ haltdef }
raw 308:*:{ haltdef }
raw 309:*:{ haltdef }
raw 310:*:{ haltdef }
raw 311:*:{ haltdef }
raw 312:*:{ haltdef }
raw 313:*:{ haltdef }
raw 314:*:{ haltdef }
raw 315:*:{ haltdef }
raw 316:*:{ haltdef }
raw 317:*:{ haltdef }
raw 319:*:{ haltdef } | ; I dont have the slightest idea how many of these or what other ones might be tripped on a whois, you set to the right ones.
raw 401:*:{ haltdef }
#GIAAN.WHOIS.RAWS end
;
on ^*:TEXT:*:#:{
  if ($cnick($nick).color == 14) {
    if ($var(%cnick. [ $+ [ $nick ] ] ,1)) { .cnick $nick %cnick. [ $+ [ $nick ] ] | unset %cnick. [ $+ [ $nick ] ] }
    else                                   { .cnick -r $nick }
  }
}
;
on *:NICK:{
  if ($var(%cnick. [ $+ [ $nick ] ] ,1)) {
    set -s %cnick. [ $+ [ $newnick ] ] %cnick. [ $+ [ $nick ] ]
    unset -s %cnick. [ $+ [ $nick ] ]
    .cnick -r $nick
    .cnick $newnick 14
  }
}


* for customization use the special popup menu and the dialogs and human interface device i built, ummm no wait that was me dreaming last night. Oh yeah see these 4 lines of code.

var %include.nicks = hvr | ;<---[ Include field (1st aohvr) of $nick(channel,N,aohvr,aohvr) see /help nick and address identifiers ]
var %exclude.nicks = o | ;<---[ Exclude field (2nd aohvr) of $nick(channel,N,aohvr,aohvr) see /help nick and address identifiers ]
var %idle.time.freshhold = 600 | ;<---[ I think we can all gather you adjust this to your liking ]
var %monitor.away.status = $false | ;<---[ If you want or dont want to use away status checking also ] * OP's can detect your WHOIS commands

There my settings above you choose your own, the OP's pmed me all grumpy like asking me why i was whoising them all day frown , then he asked for the script so he can run it LOL.
So i added in the $nick include and exclude fields
Set a value for the idle time amount
Created a on off (true/false) for the away status checking which is the bit that does the whois, becuase im in a channel with a bunch or botties and there always sending stuff, and doing 200+ whois seemed kinda pointless, actually away status seemed kinda pointless to me as well, but hey what the heck.

[edit]
Just fixed a little bug with no exclude field causing a problem.

Last edited by DaveC; 31/03/05 12:00 AM.