mIRC Home    About    Download    Register    News    Help

Print Thread
scon question #2594 19/12/02 04:36 PM
Joined: Dec 2002
Posts: 22
S
Synister Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2002
Posts: 22
Ok i want to be able to have my mp3 random player play to certain chans on diff networks.. I tried
/scon -at1 mag #chan1,#chan2 MESSAGE
but then i get errors from each network cause im not in same room name on bot networks..
Is there a way to do this w/o the errors?




Re: scon question #2595 19/12/02 05:07 PM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
okay, this:

$replace($chan(#chan1) $chan(#chan2),$chr(32),$chr(44))

will output list of active channels separated by comma, ready for the /msg command.

your command can then be:

/scon -at1 if (
$replace($chan(#chan1) $chan(#chan2),$chr(32),$chr(44))) msg $ifmatch <message>

I hope it's clear enough, anyway.

Re: scon question #2596 19/12/02 05:24 PM
Joined: Dec 2002
Posts: 22
S
Synister Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2002
Posts: 22
this is my script part

/scon -at1 msg %m.ptype Random MP3Player Online

%m.ptype being the varible for the channels to msg

guess i shoulda put a copy of the remote b4 hand
sorry




Re: scon question #2597 19/12/02 05:37 PM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
I see... maybe a loop is required here then.

'domsg' will be the custom msg alias.

Code:
alias domsg {
  var %i = $numtok(%m.ptype,32)
  while %i &gt; 0 {
    var %chan = $gettok(%m.ptype,%i,32)
    if ($me ison %chan) { msg %chan $1- }
    dec %i
  }
}
and use: /scon -at1 domsg MP3 Player online

Re: scon question #2598 22/12/02 08:24 AM
Joined: Dec 2002
Posts: 23
R
R1pl3y Offline
Ameglian cow
Offline
Ameglian cow
R
Joined: Dec 2002
Posts: 23
/scid -a msg %m.ptype Random MP3Player Online

This command /scid -a msg will msg the channel(s) you specify [color:green] (in this case you are using %m.ptype) on all networks you are connected to.
grin

Last edited by R1pl3y; 22/12/02 08:26 AM.

Rą¶¬łĄ