on text mute

By rvalentine3838 on Jul 26, 2013

simply type !hush to mute someone or !speak to let them talk again.

on *:text:!hush*:#: { if ($nick isop $chan) {
    set %Muter $2 $address($2-,1) 
    set %mute $chan
    mode $chan -v+b $address($2-,1) ~q: $+ $address($2-,1) 
    mode $chan -vqaoh+b $2 $2 $2 $2 $2 ~q: $+ $2
  }
} 

ON !*:NICK:{ 
  if ($nick == $gettok(%Muter,1,32)) {
    set %Muter $newnick $address($newnick,2) $chan 
  } 
}
ON !@*:JOIN:#:{ 
  if ($+(*,$gettok(%muter,2,32),*) iswm $wildsite) && (# == $gettok(%Muter,3,32)) {
    set %Muter $nick $address($nick,2) $chan 
    .timerdeop 1 1 check_nickop
  }
}

on !@*:RAWMODE:#:{
  if ($regex($1,/(a|v|o|h|q)/iS)) && ($2 == $gettok(%Muter,1,32)) && (# == $gettok(%Muter,3,32)) {
    mode $chan - $+ $regml(1) $2-
  }
}

alias check_nickop { 
  tokenize 32 %Muter
  mode $gettok(%Muter,3,32) -qaohv $2 $2 $2 $2 $2
}
on *:text:!speak*:#: { 
  if ($nick isop $chan) { 
    msg $chan $2 you have been taken off mute now please play nice | notice $2 if you have a higher access please update or whatnot. 
    mode $chan +v-b $address($2-,1) ~q: $+ $address($2-,1) 
    mode $chan +v-b $2 $2 $2 $2 $2 ~q: $+ $2
    unset %muter
  }
}

Comments

Sign in to comment.
Savage_CL   -  Aug 09, 2013

in your rawmode... you have $regex($1,/(a|v|o|h|q)/iS)
the i flag makes it case insensitive, but you actually don't want that in this case.

ovelayer  -  Aug 31, 2013

plus this seems like it would only hush/speak one nick at a time
is there a way that it could be made to hush/speak multiple nicks

Sign in to comment

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.