Hey folks,
We have a University that makes use of our network via a CGI client. They all connect through the same proxy, but CGI numbers differ from PC to PC. So to prevent them from creating clones i wrote a script to check idents on join and added it to my current on JOIN script.

Code:
alias ccheck {
  unset %ccchan
  var %c = 1, %b = $nick($chan, 0)
  While (%c <= %b) {
    set %ccuser $nick($chan, %c)
    Var %i = 1, %s = $nick($chan, 0)
    While (%i <= %s) {
      if ($address($nick($chan, %i),3) == $address(%ccuser, 3)) {
        if ($nick($chan, %i) != %ccuser) && ($nick($chan,%i) !isin %ccchan) {
          set %ccchan %ccchan $nick($chan, %i) &
        }
      }
      inc %i
    }
    inc %c
  }
  unset %ccuser
  if (%ccchan == $null) {
    return
  }
  else { 
    return [3I14dent 3C14lones: $left(%ccchan,$calc($len(%ccchan) - 2)) $+ ] 
    unset %ccchan* 
  }
}


Now you'll notice that there are two places where i attempt to unset the variable. The one at the start of the script unsets it, but the one at the end doesnt. Why is this? I think its fairly neat, but if anyone has a better what of doing this, please let me know.

Final thing. In order for this script to work, the IAL has to be fulled. So its current set to enable when the command is issued and the IAL is filled. Any thing to add to this to make it better?


=======================
Count WhipLash
Services Administrator
KnightNet
=======================