lame first attempt at regex :S
on 5:TEXT:*:#:{
if ($regex($1,!mute)) {
mode # +b ~q: $+ $remove($2,$)
}
if ($regex($1,!unmute)) {
mode # -b ~q: $+ $remove($2,$)
}
if ($regex($1,!bchan)) {
mode # +b ~c: $+ $remove($2,$)
}
if ($regex($1,!unbchan)) {
mode # -b ~c: $+ $remove($2,$)
}
if ($regex($1,!akick)) {
cs akick # add $remove($2,$) $+ $address($2,2)
}
}
Jethro_
You don't need $2 to be in channel for any of these codes.
I don't know what all daemons support the extended ban types
but I know unreal does.. it may be the only one that does..
on @$5:TEXT:/^!((un)?(mute|bchan)|akick) .+/iS:#:{
if ($regml(1) = akick) cs akick # add $2
else mode # $+($replace($regml(1),unmute,-b ~q,mute,+b ~q,unbchan,-b ~c,bchan,+b ~c),:,$2)
}
Gotta make sure the client is opped and the $2 ison #
on @$5:TEXT:/^!(((un)?mute|bchan)|akick) .+/iS:#:{
var %r $regml(1) | if ($2 ison #) {
if (%r = mute) mode # b ~q: $+ $v1
elseif (%r = unmute) mode # -b ~q: $+ $v1
elseif (%r = bchan) mode # +b ~c: $+ $v1
elseif (%r = unbchan) mode # -b ~c: $+ $v1
else cs akick # add $v1
}
}