You can ignore all CTCPs using /ignore -t *!*@*. That is the only way to halt ctcps like VERSION. Then create an alias to parse debug lines and catch CTCPs:

Code:
Alias Debug_Parse {
  ; Parse debug messages
}
On *:CONNECT: {
  window -h $+(@Debug,$Cid)
  .debug -i $+(@Debug,$Cid) Debug_Parse 
  .ignore -tw *!*@*
}


- Relinsquish