Can this be change to check any matching word on the line not just the exact word from the CTCP.txt ?
My ctcp.txt reads like this:
oz3
stealth.Inviter
echoX
inviter
ozinviter

Code:
 
on $*:text:/^!ctcp (on|off)/Si:*:{ 
  if $nick isop $chan {
    set $+(%,ctcp,.,$chan) $iif($2 == on,$true,$false)
    .notice $nick CTCP Version check for $chan is now $iif($($+(%,ctcp,.,$chan),2),On,Off)
  }
  elseif !$chan {
    var %a = 1, %b = $comchan($nick,0)
    while %a <= %b {
      if $nick isop $comchan($nick,%a) {
        set $+(%,ctcp,.,$comchan($nick,%a)) $iif($2 == on,$true,$false)
        notice $nick CTCP Version check for $comchan($nick,%a) is now $iif($($+(%,ctcp,.,$comchan($nick,%a)),2),On,Off)
      }
      inc %a
    }
  }
}
on @*:join:#:{
  if $($+(%,ctcp,.,$chan),2) && !$($+(%,version.check,.,$fulladdress),2) {
    .ctcp $nick VERSION 
    set -e $+(%,version.check,.,$fulladdress) $chan
  }
}
on *:ctcpreply:version*:{ 
  if $($+(%,version.check,.,$fulladdress),2) {
    if $read(ctcp.txt,nwt,$2-) { ban -k $($+(%,version.check,.,$fulladdress),2) $nick 2 14Bad Script Detected }
    unset $+(%,version.check,.,$fulladdress),
    halt
  }
}

Last edited by Garou; 05/06/07 06:45 PM.