TempMute
+ 0 likes
Please Register to submit score.
| Average Score | 2.0 |
| Scores Submitted | 1 |
| Date Added | May 04, 2007 |
| Last Updated | May 04, 2007 |
Introduction
Effect: Will mute someone for X amount of minutes
Usage: !temp(mute|gag|silence) nickname minutes
Restricted to: Operators and Half-Operators
Updated: Made notices silent, shortened status check.
mIRC Snippet:
TempMute
Posted on May 4, 2007 1:59 am
Posted on May 4, 2007 1:59 am
you can change the op/halfop to:
put a . infront of the notice.
What about a check to see if ur admin/op urself??
and $3 == $null can be made if !$3
and instead of "ban ..."
use mode $chan +b ~q:
etc etc.
| Code: |
if ($nick($chan,$nick,oh)) { |
put a . infront of the notice.
What about a check to see if ur admin/op urself??
and $3 == $null can be made if !$3
and instead of "ban ..."
use mode $chan +b ~q:
etc etc.
mIRC Snippet:
TempMute
Posted on May 4, 2007 2:49 am
Posted on May 4, 2007 2:49 am
Thanks for the advise, I've changing everything except the if that checks for parameter $3 as it's a personal preference to have it like that.
Also, yeah. Used -u to avoid using a timer or other means to remove the ban.
Also, yeah. Used -u to avoid using a timer or other means to remove the ban.
mIRC Snippet:
TempMute
Posted on May 4, 2007 2:59 am
Posted on May 4, 2007 2:59 am
I was more thinknig of:
* Note the else statement
* the $2($chan,$2,oh)
* . at the end else notice.
* $2 ison $chan
| Code: |
on $*:TEXT:/^[@!.]temp(gag|mute|silence)/Si:#: { if ($3 == $null) { .notice $nick You must specify the amount of time in minutes. halt } if ($2($chan,$2,oh)) { .notice $nick You cannot ban staff members. halt } if ($nick($chan,$nick,oh)) && ($2 ison $chan) { .mode $chan -aovh $2 $2 $2 $2 ban $+(-u,$calc($3 * 60)) $chan $+(~q:,$address($2,2)) halt } else { .notice $nick This command is restricted to Half-Operators and Operators. } } |
* Note the else statement
* the $2($chan,$2,oh)
* . at the end else notice.
* $2 ison $chan
mIRC Snippet:
TempMute
Posted on May 4, 2007 3:11 am
Posted on May 4, 2007 3:11 am
Oh, I missed the last notice and forgot to change $nick to $2.
Again, I hate using else statements, it's just a personal preference. In your script, theres no point in the else statement as you've left in the halt.
Thanks again.
Again, I hate using else statements, it's just a personal preference. In your script, theres no point in the else statement as you've left in the halt.
Thanks again.
mIRC Snippet:
TempMute
Posted on May 4, 2007 3:48 am
Posted on May 4, 2007 3:48 am
still, you would need sonme more checking:
That would sum up all of your if's needed into 1 statement.
* oh = oper/halfop check
* $chan,$2,vr = will only work if $2 is a voice or regular.
* $me($chan,$me,oh) = will only work if you are halfop/op or above.
| Code: |
if $nick($chan,$nick,oh) && $2($chan,$2,vr) && $me($chan,$me,oh) && ($2 ison $chan) { |
That would sum up all of your if's needed into 1 statement.
* oh = oper/halfop check
* $chan,$2,vr = will only work if $2 is a voice or regular.
* $me($chan,$me,oh) = will only work if you are halfop/op or above.




