Place in remotes, it returns +channelmodes, excluding $2.
Example:
$remode(#mirc,nTr)
+tl 5
^ Would return something like that
It would be useful when you use a script to add modes, then you can use this script to find and unset them when needed. You could use something like $replace($remode(#mirc,nTr),+,-)
Enjoy. I would like comments, and partial credit goes to Kerst of SwiftIRC for pointing out an error.
alias remode {
if (!$1) || ($chr(35) !isin $1) || (!$2) || ($me !ison $1) {
return
}
var %i = $len($2)
var %x = 1
var %d = $chan($1).mode
while (%x <= %i) {
var %d = $removecs(%d,$mid($2,%x,1))
inc %x
}
return %d
}