;#
;# visit http://sp00fed.org for updates or support.
;# script by Sumsar
;#
;# Tested and works on version 6.15
;# (!mute) When triggered, devoice every voice and sets channelmode +m (moderator), and will 'mute' any regular user.
;# (!unmute) When triggered, removes the channelmode +m, making it possible to write for regular users again.
;# Triggers:
;# !mute
;# !unmute
on *:TEXT:!mute:#:{
if ($nick isop $chan) {
if ($me isop $chan) {
.mode $chan +m
var %x = $nick($chan,0,v),%list
while (%x) {
var %list = $addtok(%list,$nick($chan,%x,v),32)
if ($numtok(%list,32) == 6) {
.mode $chan $str(-v,$numtok(%list,32)) %list | var %list
}
dec %x
}
if ($numtok(%list,32) > 0) {
.mode $chan $str(-v,$numtok(%list,32)) %list
}
.msg $chan Channel is now muted (channelmode +m) and you wont be able to write, please standby for further information.
}
else { .notice $nick Error: I'm not opped. }
}
}
on *:TEXT:!unmute:#:{
if ($nick isop $chan) {
if ($me isop $chan) {
.mode $chan -m
.msg $chan Channel is now unmuted (channelmode -m) and you are able to write again.
}
else { .notice $nick Error: I'm not opped. }
}
}