mIRC Home    About    Download    Register    News    Help

Print Thread
Alias to pop up #169050 18/01/07 05:07 PM
Joined: Oct 2006
Posts: 60
M
moshkin Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Oct 2006
Posts: 60
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)
}
 

Re: Alias to pop up [Re: moshkin] #169059 18/01/07 06:04 PM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
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?

Re: Alias to pop up [Re: DJ_Sol] #169122 19/01/07 06:35 PM
Joined: Oct 2006
Posts: 60
M
moshkin Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Oct 2006
Posts: 60
ban them.

Re: Alias to pop up [Re: moshkin] #169162 19/01/07 11:51 PM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
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.

Re: Alias to pop up [Re: DJ_Sol] #169164 19/01/07 11:57 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net