Channel Modes for Justin.tv

By Keon191 on Jul 22, 2010

Screenshots

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 } 
  }
}

Comments

Sign in to comment.
meluygas   -  Jul 30, 2010

hello thank you for answering keon191 ... would like to know how to put q trivia game or save my money info bot .. I would love for some secillospara study ... I hope your answer thanks:)

 Respond  
Keon191   -  Jul 29, 2010

well meluygas i'll help if i can :) but alot of people here are 1000 times better with scripting than i am :)

 Respond  
meluygas   -  Jul 29, 2010

hello friend i am new to this theme .... I have a bot bot mirc on justin.tv called meluygas3_ [bot] I wonder if can help me to add some commands ... I hope your answer thanks

 Respond  
Jethro   -  Jul 25, 2010

WorldDMT, perhaps you missed my point. As you can see, Keon191 used > mode # -b $2So theoretically, that is supposed to be

ban -r $2 2
 Respond  
WorldDMT   -  Jul 25, 2010

you'r welcome bro :D

PS: it's ban -k $2 2
2 is the mask he can change it as he want

 Respond  
Jethro   -  Jul 24, 2010

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.

 Respond  
WorldDMT   -  Jul 24, 2010

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.)
    }
  }
}
 Respond  
Jethro   -  Jul 22, 2010

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.
    }
  }
}
 Respond  
Keon191   -  Jul 22, 2010

on justin.tv you have to use /unban to remove the 10 min timeout or undo a kick/ban. thats why i used /mode # -b $2 . so they exist on the ban list for 10 min if they were kicked.

 Respond  
Jethro   -  Jul 22, 2010

You only need ONE text event and check for op. You should also include a check to see if the $2 exists in the ban list before removing it.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.