Some channel modes Ops can use for justin.tv. Also a purge script
!purge
deletes a users message. user can still talk after getting purged
+f
enables followers only mode
-f
disables followers only mode
[ F ]
only followers can chat. on other servers it may be knows as friends only mode. or something like that.
+m
enables slow mode
-m disables slow mode
[ M ] users have a limit on how much they can say per minute [ does not include ops and voiced users ]
on *:text:!purge*:#: {
if ($nick isop $chan) { { kick # $2 | /mode # -b $2 } { notice $2's message has been purged }
}
}
on *:text:+f*:#: {
if ($nick isop $chan) { { /mode # +f } { msg $nick # is now in friends only mode }
}
}
on *:text:-f*:#: {
if ($nick isop $chan) { { /mode # -f } { msg $nick # is no longer in friends only mode }
}
}
on *:text:+m*:#: {
if ($nick isop $chan) { { /mode # +m } { msg $nick # is now in slow mode }
}
}
on *:text:-m*:#: {
if ($nick isop $chan) { { /mode # -m } { msg $nick # is no longer in slow mode }
}
}
lol WorldDMT! You've become my personal editor. :P I did think about using $iif, but I just wanted to make it simple for Keon191 to see. Nice job, though. And thanks for looking out for me.
P.S. about the $regml(1) thing, I referred to it because I included the /S modifier, which will strip control codes. Since you have the tokenize 32 $strip($1-) included, you can remove it in the regex. Also, the > kick # $v1
mode # -b $v1 is not the same as > ban -k # $2 $2Keon191 wants to remove it...the way he made it that way is according to how his server works.
to avoid repetition u can use $iif() and u can use tokenize and use $1 untead of $regml(1)
and /ban -k to kick ban user
on @$*:text:/^(\!purge|[+-](f|m))\b/iS:#:{
if !%f {
inc -u4 %f
tokenize 32 $strip($1-)
if ($1 == !purge) && ($2 ison #) {
ban -k # $2 2
notice $2 message's been purged.
}
var %x $pos($1,+,1),%y $right($1,1)
elseif ((%x) && (%y !isincs $chan(#).mode)) || ((!%x) && (%y isincs $chan(#).mode)) {
mode # $1
msg # $nick $+ , # is $iif(%x,now,no longer) $iif(%y = m,in slow mode.,in friends only mode.)
}
}
}
Ok, but you should do it with one event, along with some checks to see whether the modes have been set, the $2 is on channel, and the trigger control is implemented in case of spam or flood abuse:
on $*:text:/^(\!purge|[+-](f|m))\b/iS:#:{
if ($nick isop #) && (!%f) {
inc -u4 %f
if ($regml(1) == !purge) && ($strip($2) ison #) {
kick # $v1
mode # -b $v1
notice $v1 message's been purged.
}
elseif (f !isincs $chan(#).mode) && ($regml(1) == +f) {
mode # $v1
msg # $nick $+ , # is now in friends only mode.
}
elseif (f isincs $chan(#).mode) && ($regml(1) == -f) {
mode # $v1
msg # $nick $+ , # is no longer in friends only mode.
}
elseif (m !isincs $chan(#).mode) && ($regml(1) == +m) {
mode # $v1
msg # $nick $+ , # is now in slow mode.
}
elseif (m isincs $chan(#).mode) && ($regml(1) == -m) {
mode # $v1
msg # $nick $+ , # is no longer in slow mode.
}
}
}