mIRC Homepage
Posted By: moshkin Alias to pop up - 18/01/07 05:07 PM
I was wondering if someone could change this into a pop up, that if any half op or op would type !mute (someones nick) 5 it would mute them for 5 mins, but i want the time to be a variable.

Code:
 /mute /mode $chan +b ~q: $+ $address($$1,2) | /say $$1 you have been muted. Please take this time to think what you're saying. After the mute, if you continue to misbehave, you will be removed
/mute10 {

  /mode $chan -b ~q: $+ $address($$1,2)
}
/mute5 {
  /mode $chan +b ~q: $+ $address($$1,2) | /msg $chan $$1 you have been muted for five minutes. Please take this time to think what you're saying. After the mute, if you continue to misbehave, you


  /timer 0 300 /mode $chan -b ~q: $+ $address($$1,2)
}

/unmute /mode $chan -b ~q: $+ $address($$1,2) | /say $$1 you have now been unmuted. We hope youve thought over your actions and are now ready to participate in a acceptable manner.
/mute10 {

  /mode $chan -b ~q: $+ $address($$1,2)
}
/mute5 {
  /mode $chan +b ~q: $+ $address($$1,2) | /msg $chan $$1 you have been muted for five minutes. Please take this time to think what you're saying. After the mute, if you continue to misbehave, you


  /timer 0 300 /mode $chan -b ~q: $+ $address($$1,2)
}
 
Posted By: DJ_Sol Re: Alias to pop up - 18/01/07 06:04 PM
1. A popup is not a text command, it is a menu.
2. To mute someone do you want to ban them or simply -v them?
Posted By: moshkin Re: Alias to pop up - 19/01/07 06:35 PM
ban them.
Posted By: DJ_Sol Re: Alias to pop up - 19/01/07 11:51 PM
Code:
on @*:text:!mute *:#:{
if ($nick !isop $chan) || ($nick !ishop $chan) halt
if (!$2) { msg $chan Please include a nickname $nick | halt }
if ($2 !ison $chan) { msg $chan $2 is not on $chan $nick | halt }
mode $chan +b $2
msg $chan You have been muted $2 $+ . Please take this time to think what you're saying. After the mute, if you continue to misbehave, you will be removed!
}


I write scripts for an IRCxPro server, so I'm not sure how this mutes the person ... Regardless, I think thats what you want.
Posted By: Riamus2 Re: Alias to pop up - 19/01/07 11:57 PM
A banned user cannot talk in a channel (even though they can stay in there if they aren't kicked).

A couple of things to help you with that script...

1) You can use ELSEIF/ELSE to prevent the need to halt anything. It just needs a little adjustment to work that way.

Code:
on @*:text:!mute *:#:{
  if ($nick isop $chan) || ($nick ishop $chan) {
    if (!$2) { msg $chan Please include a nickname $nick }
    elseif ($2 !ison $chan) { msg $chan $2 is not on $chan $nick }
    else {
      mode $chan +b $2
      msg $chan You have been muted $2 $+ . Please take this time to think what you're saying. After the mute, if you continue to misbehave, you will be removed!
    }
  }
}


And, 2) if you want to halt a script like this (error checking or similar reasons), you should use RETURN instead of HALT. Both do work, but return prevents any confusion over whether you're halting the default actions or the script's actions.
© mIRC Discussion Forums