Mute Script

By MichaelA on Oct 07, 2010

While idling on a couple of average sized IRC networks, I began to notice that people had mute scripts that fail, so i got the idea to make a mute script that will track the nicknames, so they cannot bypass the mute. I know this script has a couple of flaws(One being that it also mutes clones of the muted user when they join), and the fact that it is limited to one nick/channel at a time, but it's still a begining ^^ please feel free to leave ideas on how i can make it more practical/effective, or you can simply come visit me on my server: redirc.zapto.org (/server -m redirc.zapto.org -j #Main). ^^

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]:.
      .timermute 1 $calc(%Mute.Time * 60) mode $chan +v-b %Mute.Nick ~q: $+ $address(%Mute.Nick,2)
      .timermute 1 $calc(%Mute.Time * 60) unset %Mute*
    }
    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)
    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
  }
}
Sign in to comment.
NeevaCandida   -  Sep 10, 2011

Thanks!

 Respond  
PyThOn   -  Sep 09, 2011

Type Alt+R Then go to remotes then paste this code, I think this snippet would be better if it picked up on ip instead of just nick.

 Respond  
NeevaCandida   -  Sep 09, 2011

Hi,

I am a complete newbie.

Where would one load a script like this? Is there a good source for instruction on this type of thing?

Thanks, Neeva

 Respond  
Phil_FW   -  May 19, 2011

lol Thanks :)

 Respond  
Person   -  May 18, 2011

I love muting people. especially when it comes to typing in the Reason, but in the original script code, the minutes arent accurate.I have to ''unmute'' the person myself rather than it being automatically voiced after muting that person. So i tried out the code Phil24 (^) posted, and WOW it works like a charm!

 Respond  
Phil_FW   -  Jan 01, 2011

here is a rewrite, with EVERYTHING working :D .. i noticed a couple other things didnt work either, i also made minor color and message improvements... also it has been set to deowner, deprotect, deop, dehalfop, and devoice anybody who uses update also :D


menu nicklist {
  [-[-Mute/Unmute-]-]
  ..[-[-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,1 $+ %Mute.Nick $+ 4,1]:. .:[4,1Your tongue has been cut off for11,1 %Mute.Time 11minutes4,1]:. .:[9,1Reason:7,1 %MUTEMSG $+ 4]: 1,8Take this as a warning8,1:
      .timermute1 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)
      .timermute2 1 $calc(%Mute.Time * 60) msg $chan 9,1 %Mute.Nick .:[9,1You have been unmuted. 15,1In the future, 11,1please follow 7,1ALL 11,1the rules, 12,1and you will not be muted again4,1]:. .:[11,1The reason you were muted for is:9,1 %MuteMSG $+ 4,1]:.
      .timermute3 1 $calc(%Mute.Time * 60) mode $chan +v-b %Mute.Nick ~q: $+ $address(%Mute.Nick,2)
      .timermute4 1 $calc(%Mute.Time * 60) notice %Mute.Nick 4,1If you have a higher access please type 9,1/hop4,1 or 9,1/ns update
      .timermute5 1 $calc(%Mute.Time * 60) unset %Mute*
    }
    else { echo -a 4,1.:[9,1Error:11,1 You must specify a time in numbers!4,1]:. }
  }
  ..[-[-UNMUTE $1 $+ -]-]:{
    if ($1 == %Mute.Nick) {
      mode $chan +v-b %Mute.Nick ~q: $+ $address(%Mute.Nick,2)
      msg $chan 9,1 %Mute.Nick $+ , 9,1you are now unmuted. 7,1Next time be good please.
      notice %Mute.Nick 4,1If you have a higher access please type 9,1/hop4,1 or 9,1/ns update
      unset %Mute*
      timermute1 off
      timermute2 off
      timermute3 off
      timermute4 off
      timermute5 off
    }
    else { echo -a 4,1.:[9,1Error:11,1 There is no muted nick!4,1]:. }
  }
}

ON *:NICK:{ 
  if ($nick == %Mute.Nick) {
    set %Mute.Nick $newnick 
  } 
}
ON *:JOIN:%Mute.Channel:{ 
  if ($address($nick,2) == $address(%Mute.Nick,2)) {
    .timerdeop 1 3 mode $chan -vqaoh $nick $nick $nick $nick $nick
    set %Mute.Nick $nick
    msg $chan 9,1 $nick $+ , 11,1Do not try that, it will not work.
  }
}
ON *:VOICE:%Mute.Channel:{
  if ($2 == %Mute.Nick) {
    mode $chan -v $2
  }
}
ON *:HELP:%Mute.Channel:{
  if ($2 == %Mute.Nick) {
    mode $chan -hv $2 $2
  }
}
ON *:OP:%Mute.Channel:{
  if ($2 == %Mute.Nick) {
    mode $chan -ohv $2 $2 $2
  }
}
on @1:RAWMODE:%Mute.Channel:{ 
  if (+a isin $1) && ($2 == %Mute.Nick) { 
    mode $chan -aohv $2 $2 $2 $2 
  }
}
ON *:OWNER:%Mute.Channel:{
  if ($2 == %Mute.Nick) {
    mode $chan -qaohv $2 $2 $2 $2 $2
  }
}
 Respond  
Phil_FW   -  Jan 01, 2011

change each .timermute to something like, .timermute1, .timermute2, etc. thats the only way it worked for me

 Respond  
MichaelA   -  Nov 24, 2010

Lmao Soubi ;) I told you I haven't updated it yet....I will soon however. I'm making some improvements to it first :P

 Respond  
Soubi   -  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  
_Teen_   -  Oct 16, 2010

its was just an example to apply ban on nicks... of course no need 2 lines

 Respond  
napa182   -  Oct 16, 2010

Teen Said: [quote] look, why dont u put a ~n on nick, so there is no reason to this like mode +b ~q: $+ $address(%Mute.nick,2) mode +b ~n: $+ $address(%Mute.nick,2) [/quote]

no need to make that 2 diff lines. you can put in one

mode # +bb ~q: $+ $address(%Mute.nick,2) ~n: $+ $address(%Mute.nick,2)
 Respond  
blackvenomm666   -  Oct 16, 2010

meh mute is avoidable whether given on ip or nick its not hard

 Respond  
MichaelA   -  Oct 07, 2010

Yea i know :) Thanks ^_^

 Respond  
Massivity   -  Oct 07, 2010

agreed with Teen

 Respond  
_Teen_   -  Oct 07, 2010

look, why dont u put a ~n on nick, so there is no reason to this

and no need a on nick event here, cause u mute their ip's... so if ppl change the nick, the mute will be there

ON *:NICK:{ 
  if ($nick == %Mute.Nick) {
    set %Mute.Nick $newnick 
  } 
}

like mode +b ~q: $+ $address(%Mute.nick,2) mode +b ~n: $+ $address(%Mute.nick,2)

so this, ppl will not evade the mute if mute is given on nick

by the way, you need to unset Global vars

unset %mute*

 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.