mIRC Home    About    Download    Register    News    Help

Print Thread
#115157 23/03/05 12:23 AM
Joined: Feb 2005
Posts: 193
A
Vogon poet
OP Offline
Vogon poet
A
Joined: Feb 2005
Posts: 193
Hey everyone. I'm looking for a command that will prevent msgs I send from going to no-voice users. What I mean is, I need a code that when I msg something, it will only send that msg to voice users. Can anyone help? confused

#115158 23/03/05 12:59 AM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Are you trying to send a message to all the users in the channel except for regular users?

Code:
 alias nmsg {
  var %e = 1
  while $nick(#,%e,a,r) {
    msg $v1 message here
    inc %e
  }
}   


Command: /nmsg
Code:
 

or 


alias nmsg {
  var %e = 1
  while $nick(#,%e,a,r) {
    msg $v1 $1-
    inc %e
  }
}   


Command: /nmsg message here

Last edited by xDaeMoN; 23/03/05 01:36 AM.
#115159 23/03/05 01:01 AM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
Please note that I have not tested this script, but I think it should work.

Command must be used in a room...will not work when used via pm..Sorry.

Usage: /vmsg <nick(s)> <message>
Code:
 alias vmsg {
  if $2 {
    var %a = $2-
    while (%a) {
      if $nick(#,$gettok(%a,1,32),v) {        set %vnick $addtok($vnick,$nick(#,$gettok(%a,1,32),v),32)      }
      if !$istok(%vnick,$gettok(%a,1,32),32) {        set %nmsg $addtok(%nmsg,$gettok(%a,1,32),32)      }
      var %a = $remtok(%a,$gettok(%a,1,32),1,32)
    }
    set %msg = $remove($2-,%nmsg,%vnick)
    if (!%msg) {
      .msg $nick No message to send
      halt
    }
    if (!%vnick) {
      .msg $nick No one voiced in #
      halt
    }
    while (%vnick) {
      .msg $gettok(%vnick,1,32) %msg
      var %vnick = $remtok(%vnick,$gettok(%vnick,1,32),1,32)
    }
  }
  else .msg $nick No one to message
}
 

#115160 23/03/05 03:13 AM
D
DaveC
DaveC
D
Do you mean u want to send a channel message, but one that shows only to +v nicks? If so I dont think you can.

If you mean you want to limit a persoanl message to NickX to only send if he is a +v then use $nick(#channel,NickX,v) to see if hes +v

;/vmsg nick message
;belliesup if your not in a channel
alias vmsg { if ($nick(#,$$1,v)) { msg $1 $$2- } }

or

;vmsg channel nick message
;channel is the channel to check if the nick is +v on
alias vmsg ( if ($nick($1,$$2,v)) { msg $2 $$3- } }

#115161 23/03/05 07:22 PM
Joined: Jan 2005
Posts: 186
Vogon poet
Offline
Vogon poet
Joined: Jan 2005
Posts: 186
Or why not to use rawmessage?

Code:
/raw PRIVMSG @#channel &lt;text&gt; [color:blue]Message to all ops in channel[/color]
/raw PRIVMSG +#channel &lt;text&gt; [color:blue]message to all voices on channel[/color]
/raw PRIVMSG @+#channel &lt;text&gt; [color:blue]message to all ops and voices in channel[/color]


Works well at least to me cool

:edit:
Forgot halfops but the procedure is same
/raw PRIVMSG %#channel <text>

Last edited by Brax; 23/03/05 07:27 PM.

echo -a $signature
#115162 23/03/05 08:29 PM
D
DaveC
DaveC
D
Most excellent dude, didnt know you could do that, specing a @+ etc on a channel like that.

Just one thing....
/raw PRIVMSG @#channel :<text> Message to all ops in channel
/raw PRIVMSG +#channel :<text> message to all voices on channel
/raw PRIVMSG @+#channel :<text> message to all ops and voices in channel
/raw PRIVMSG %#channel :<text> message to all halfops and voices in channel

: needs to be in there (well did for me) something about telling the IRC server that everything following is one parameter, if u dont it only sends the first word of the text frown

#115163 23/03/05 08:44 PM
Joined: Jan 2005
Posts: 186
Vogon poet
Offline
Vogon poet
Joined: Jan 2005
Posts: 186
whooooops my bad colons need to be there indeed blush

and to nag bit more then
Quote:

/raw PRIVMSG %#channel :<text> message to all halfops and voices in channel

its not halfops and voices its halfops only :tongue:

Last edited by Brax; 23/03/05 08:54 PM.

echo -a $signature
#115164 25/03/05 05:34 AM
Joined: Feb 2005
Posts: 193
A
Vogon poet
OP Offline
Vogon poet
A
Joined: Feb 2005
Posts: 193
Thanks everyone. I leaned alot. smile By the way, sorry about the delay. I've been really busy. crazy

#115165 25/03/05 07:14 AM
D
DaveC
DaveC
D
Pffffffft My bad, i copied the text from the line above and didnt even read it just changed the op to halfop frown


Link Copied to Clipboard