I don't use any networks with services that allow banning channels, but here's a possible method to do what you want. I can't test it and don't know if it's the correct format for that kind of ban.

Code:
  elseif ($1 == !banchan) { mode +b $chan ~c:# $+ $2 }


Note that /'s aren't needed in scripts. Also, you can't put something touching the $ in an identifier. To combine things, use $+.


Invision Support
#Invision on irc.irchighway.net