mIRC Homepage
Posted By: MrDoom mute - 01/12/04 11:42 PM
hi guys just a simple question...is there a script that i can use as a popup to mute someone in my room,so none of his text shows up in the channel?thanks in advance for the responses! wink
Posted By: Zyzzyx26 Re: mute - 01/12/04 11:45 PM
You can sue something I know as Duct Tape ban. If you ban the person but does not kick them, they will not be able to send any messages to the channel. Nor change nicknames smile

I've seen it many times, and it works great! smile

Cheers,
Zyzzyx.
Posted By: MrDoom Re: mute - 02/12/04 12:00 AM
but if i do that when he leaves the room he will be banned,i just want to mute him for 5-10 mins to teach him a lesson is all,do u know of any other way to just mute?but thanks for the response!
Posted By: Relinsquish Re: mute - 02/12/04 12:54 AM
Code:
Alias Mute { mode # +b ~q: $+ $Address($$1,2) | .timer 1 $Calc($$2 * 60) mode # -b ~q: $+ $Address($$1,2) }

Syntax: /mute Nickname Minutes
Posted By: Zyzzyx26 Re: mute - 02/12/04 01:45 AM
That only works in some networks.. the ones running Unreal IRCd, I think.

Yes, if you Duct Tape them and they leave, then they won't be able to come back. But, as you said, the mute would only last a few minutes.. so would the ban. You could have, if you wish, a script that unbans the "mutted" ones when they part the channel.
Posted By: Relinsquish Re: mute - 02/12/04 02:45 AM
In that case:

Code:
Alias Mute {
If ($1 ison #) {
If (!$Istok(%Mute. [ $+ [ # ] ],$1,32) == $True) {
set $IfMatch $IfMatch $Address($1,2)
mode # +b $Address($1,2)
.timer 1 300 unbanmute # $Address($1,2)
}
Else { unbanmute # $Address($1,2) }
}
}
Alias unbanmute {
set %Mute. [ $+ [ $1 ] ] $Remtok(%Mute. [ $+ [ $1 ] ],$2,1,32)
mode $1 -b $2
}
On @!*:JOIN:#: {
If ($Istok(%Mute. [ $+ [ # ] ],$Wildsite,32) == $True) { mode # +b $Wildsite }
}
On @!*:PART:#: {
If ($Istok(%Mute. [ $+ [ # ] ],$Wildsite,32) == $True) { mode # -b $Wildsite }
}


Syntax: /mute Nickname
A rough way of doing it. I kind of rushed this script. This auto unbans after 5 minutes.
Posted By: MrDoom Re: mute - 02/12/04 04:09 AM
i tryed that script by placing in my aliasscripts,but when i type /mute nickname it comes back with Mute unknown command.what have i done wrong,?
Posted By: Sigh Re: mute - 02/12/04 04:32 AM
Put it in the Remotes section
Posted By: Zyzzyx26 Re: mute - 02/12/04 04:48 AM
Code:
If (!$Istok(%Mute. [ $+ [ # ] ],$1,32) == $True) {
set $IfMatch $IfMatch $Address($1,2)

If I'm not mistaken, in the IF statement, you don't need the "== $True" part. You can just leave it as If (!$Istok(%Mute. [ $+ [ # ] ],$1,32)). Also, in this case, the $ifmatch will return $true instead of the %var's name. Try this:
Code:
if (!$istok(%mute. [ $+ [ # ] ],$1,32)) { 
 ; $ifmatch (or $v1) returns "$true"
 set $+(%,mute.,#) $addtok($eval($+(%,mute.,#),2),$address($1,2),32)
 ...
}

The same "not using the == $true" thing goes to the ON Join and ON Part events, at the end of the code. This doesn't really matter, but the $ifmatch issue does.

Cheers,
Zyzzyx.
Posted By: MrDoom Re: mute - 02/12/04 04:50 AM
same problem in the remotes section,no idea what is wrong with it,but thanks for the help....must be something i am doing wrong i will try and figure it out thanks!
Posted By: Zyzzyx26 Re: mute - 02/12/04 04:57 AM
In the code, try replacing the red part for the green part, from the post above yours. Please remember to remove those 3 dots ( ... ) from the code!
Posted By: Relinsquish Re: mute - 02/12/04 05:05 AM
I thought it returns either $True or $False. :P
Posted By: MrDoom Re: mute - 02/12/04 11:56 AM
ok this is what i have for the script now......

Alias Mute {

If ($1 ison #) {

if (!$istok(%mute. [ $+ [ # ] ],$1,32)) {

; $ifmatch (or $v1) returns "$true"

set $+(%,mute.,#) $addtok($eval($+(%,mute.,#),2),$address($1,2),32)


mode # +b $Address($1,2)

.timer 1 300 unbanmute # $Address($1,2)

}

Else { unbanmute # $Address($1,2) }

}

}

Alias unbanmute {

set %Mute. [ $+ [ $1 ] ] $Remtok(%Mute. [ $+ [ $1 ] ],$2,1,32)

mode $1 -b $2

}

On @!*:JOIN:#: {

If ($Istok(%Mute. [ $+ [ # ] ],$Wildsite,32) == $True) { mode # +b $Wildsite }

}

On @!*:PART:#: {

If ($Istok(%Mute. [ $+ [ # ] ],$Wildsite,32) == $True) { mode # -b $Wildsite }

}

is there anything wrong with it now?i have it in my remote section...and do i have to put my channel name where all the #'s are?i am still new to all this ,so i am sorry if i just don't get it but i really do appreciate all the help guys.thanks again,i know i am being a pain in the ass.but i still need some help with it.
Posted By: Zyzzyx26 Re: mute - 02/12/04 01:18 PM
Apparently, there is nothing wrong with the code. To mute someone, you should use /mute <nickname> - the script takes care of the rest. Are you an @Op in the channel? Because if you're not, then the script won't work.

Btw, you can also replace If ($1 ison #) { for if ($me isop #) && ($1 ison #) { - this way the code only works if you are opped in the channel.

Also try typing /remote on - this will turn the scripts on, if they are off.

Hope this helps,
Zyzzyx smile
Posted By: MrDoom Re: mute - 02/12/04 02:21 PM
ok guys i have tryed all kinds of stuff to get this script to work,but nothing has worked,if i place it in my remotes section,there is no activator to get it working and if i place it in my alias section it comes back with mute is unknowm command.so i am completely lost right now,i will keep trying to get it to work,but thank you guys for all the help!much appreciated!
yes i am an op/owner on the channel,and the remotes are on...
Posted By: Zyzzyx26 Re: mute - 02/12/04 03:54 PM
I've tested the code here, and it works fine. What you can do is: paste the code in an empty text file (like notepad) and save it as Mute.txt in your mIRC folder. Then, open mIRC and type /load -rs Mute.txt.

This will load the code in a new page, which assures that no other script interferes with the /mute. Click Ok and test it, with /mute <nickname>

I can't see any other reason for it not working. Are you using mIRC version 6.16? That might influence, although I don't think it's that...

Good luck,
Zyzzyx.
Posted By: LethPhaos Re: mute - 02/12/04 07:33 PM
you could put the channel +m (moderated) and give everyone +v (voice), except the muted person. persons without +v cant talk in a moderated channel.
Posted By: DaveC Re: mute - 02/12/04 09:19 PM
when you put an alias in the alias section you just need....
name { ... }
when in the remotes section you nned to tell it its an alias with (suprisingly)...
alias name { ... }

so unless you removed the word alias it should have worked in the remotes section. (or just take that word off the one in the alias section)
© mIRC Discussion Forums