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
}
}
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!
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
}
}
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..
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*