mIRC Home    About    Download    Register    News    Help

Print Thread
#231234 09/04/11 11:40 AM
Joined: Sep 2007
Posts: 202
F
firefox Offline OP
Fjord artisan
OP Offline
Fjord artisan
F
Joined: Sep 2007
Posts: 202
I am an op in a channel with a lot of text (due to output from a bot)

There are about 30 people in the channel but any important messages I send might get lost in the spam

So I want to be able to send out the same message to everyone who has +v (i.e. not to ops) by preferably using an alias

i.e.

/msgall - Hey <important message>

what is the best way to do this?

firefox #231236 09/04/11 05:01 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
This may not be the best way to do it, but it is an option.
Code:
alias msgall {
  if !$1 { echo -a No message specified }
  else {
    var %a = 1, %b = $nick($chan,0,v), %vnicks
    while %a <= %b {
      var %vnicks = $addtok(%vnicks,$nick($chan,%a,v),44)
      inc %a
    }
    .msg %vnicks $1-
  }
}

Note that, per your specifications, this only sends to those that are voiced.
P.S.: I accept no responsibility if this script is used and/or abused.

Last edited by RusselB; 09/04/11 05:02 PM.
firefox #231238 09/04/11 06:07 PM
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
What about using:

/notice +#channel Hey <important message>

or /msg +#channel ...

Although ops get these too, they're simpler to manage, and won't flood you off if there are a lot of +v users.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
argv0 #231239 09/04/11 06:19 PM
Joined: Sep 2007
Posts: 202
F
firefox Offline OP
Fjord artisan
OP Offline
Fjord artisan
F
Joined: Sep 2007
Posts: 202
thanks guys will try it out

and nice option argv0 didn't know about that

argv0 #231245 09/04/11 09:28 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I didn't know about that option either. Thanks for improving my knowledge of mIRC Scripting.


Link Copied to Clipboard