mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2003
Posts: 3
I
irony Offline OP
Self-satisified door
OP Offline
Self-satisified door
I
Joined: Mar 2003
Posts: 3
Hi guys, gals, others smile

Is it possible to /msg selected channels with the same /msg. I know there's /amsg but that's for all. I just want it for some. Preferably an easy way smile

Joined: Feb 2003
Posts: 37
D
Ameglian cow
Offline
Ameglian cow
D
Joined: Feb 2003
Posts: 37
Just /mmsg #channel1.#channel2.#channel3 text to send :P

Code:
 alias mmsg {
var %number.of.chans.to.msg = $numtok($1,46)
while (%number.of.chans.to.msg != 0) {
write mmsg.txt msg $gettok($1,number.of.chans.to.msg,46) $2
dec %number.of.chans.to.msg 1
}
while ($read(mmsg.txt, w, *) != $null) {
[ / [ $+ [ $read(mmsg.txt, 1) ] ] ]
write -dl1 mmsg.txt
}
if (($read(mmsg.txt, w, *) == $null) { .remove mmsg.txt }
}

Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
Here's a way (it can't be to many channels though)...

/msg #chan1,#chan2,#chan3 Message


NaquadaBomb
www.mirc-dll.com
Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
druiddk:

Ouch! do yourself a favor... /help hash tables smile


NaquadaBomb
www.mirc-dll.com
Joined: Mar 2003
Posts: 3
I
irony Offline OP
Self-satisified door
OP Offline
Self-satisified door
I
Joined: Mar 2003
Posts: 3
thanks kindly peoples, i will try the /mmsg alias, looks just what i need, I'm way too lazy and dumb to even try and understand hash tables, unless it's tables with has.... ummmm, never mind :P

Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
Why use that alias? What I said has the same functionality and is built-in to mirc. If you have all channels on one line you are limited to a max line length. It would be better to directly script a loop in to your code rather than trying to do it with one commands because no matter which method you use, multiple commands are still being sent to the server.

This code messages everyone in your internal address list
Code:
alias msg.ial {
  var %Index 1 | var %Nick | set %Nick $gettok($ial(*!*@*, 1), 1, 33)
  while (%Nick) {
    msg %Nick $1-
    inc %Index | set %Nick $gettok($ial(*!*@*, 1), 1, 33)
  }
}


This code messages all channels joined to on a particular network
Code:
alias msg.all.chan {
  var %Index 1
  while ($chan(%Index)) {
    msg $chan(%Index) $1-
    inc %Index
  }
}


If you're interested I could give you some "funky" ways to add in delays too, so you don't get killed for server flooding... smile

btw, don't be afraid, try it....
mmm, Hash tables smirk


NaquadaBomb
www.mirc-dll.com
Joined: Mar 2003
Posts: 3
I
irony Offline OP
Self-satisified door
OP Offline
Self-satisified door
I
Joined: Mar 2003
Posts: 3
thanks for the info, i just want to msg certain channels with info at variopus times and the info may be more appropriate to some channels i am in and not to others so having that option suits my needs perfectly. Having the option of just typing the channels and the message is easy and simple to me and to be perfectly honest i don't have the time, inclination or patience to sit down and try and learn more new stuff.

Appreciate the inoput though, thanks


Link Copied to Clipboard