Soubi commented on a Page, Mute Script  -  Nov 16, 2010

MichaelA: I had some trouble with this script actually.. :/ this is what i did with it..

menu nicklist {
  .[-[_Mute_]-]
  ..[-[-Mute $1 $+ -]-]:{
    set %Mute.Nick $1
    set %Mute.Channel $chan
    set %Mute.Time $$?"How many minutes do you want to mute %Mute.Nick for?"
    if (%Mute.Time isnum) {
      set %MuteMSG $$?"What do you want the mute message to be?"
      msg $chan 4,1.:[9 $+ %Mute.Nick $+ 4]:. .:[11You have been muted for9 %Mute.Time 11minutes4]:. .:[11Reason:9 %MUTEMSG $+ 4]:.
      .timerMUTE 1 $calc(%Mute.Time * 60) mode $chan -b $+ $iif(%Mute.Nick isavoice #,+v) ~q: $+ $address(%Mute.Nick,2) %Mute.Nick
      mode $chan -vqaoh+b %Mute.Nick %Mute.Nick %Mute.Nick %Mute.Nick %Mute.Nick ~q: $+ $address(%Mute.Nick,2)
      .timerMUTE  1 $calc(%Mute.Time * 60) msg $chan 4,1.:[9 $+ %Mute.Nick $+ 4]:. .:[11You have been unmuted. In future, please follow all the rules, and you will not be muted again4]:. .:[11The reason you were muted for is:9 %MuteMSG $+ 4]:.
      .timer  1 $calc(%Mute.Time * 60) mode $chan +v-b %Mute.Nick ~q: $+ $address(%Mute.Nick,2)
      .timer  1 $calc(%Mute.Time * 60) unset %Mute.Nick
    }
    else { echo -a 4,1.:[9Error:11 You must specify a time in numbers!4]:. }
  }
  ..[-[-Unmute $1 $+ -]-]:{
    mode $chan +v-b %Mute.Nick ~q: $+ $address(%Mute.Nick,2)
    .timer 1 1 msg $chan 4,1.:[9 $+ %Mute.Nick $+ 4]:. .:[11You have been unmuted early. In future, please follow all the rules, and you will not be muted again4]:. .:[11The reason you were muted for is:9 %MuteMSG $+ 4]:.
    unset %Mute*
    .timerMUTE   off
  }
}

ON *:NICK:{ 
  if ($nick == %Mute.Nick) {
    set %Mute.Nick $newnick 
  } 
}
ON *:JOIN:%Mute.Channel:{ 
  if ($address($nick,2) == $address(%Mute.Nick,2)) {
    mode $chan -v $nick
    set %Mute.Nick $nick
  }
}

I had to fix a few of the timers..and the unmute feature o.O it looks good how it is when you did it..but it didnt like to work correctly :P..you know how some scripts are a pain in the ass..

 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.