mIRC Homepage
Posted By: AWEstun Multiple status/server windows and /echo - 14/06/08 06:14 AM
How can I use multiple status/server windows and ensure that /echo get's output on the correct status/server window. I've been seeing some /echo out that should be one one status/server window show up on a different status/server window. Can the -s switch in the /echo command be customised to a specific status/server window? I.E. /echo -s:server1 $output
Posted By: RusselB Re: Multiple status/server windows and /echo - 14/06/08 06:12 PM
Not to my knowledge currently. Might make a good feature suggestion.

To the best of my knowledge the -s switch will echo to the status window of the active network that the /echo command is used on.

Technically this could be done using /scon or /scid but as has been noted passing unknown information to these commands can cause problems.
Posted By: argv0 Re: Multiple status/server windows and /echo - 14/06/08 06:27 PM
There's no reason for /echo to implement this behaviour because then a) people would request a similar switch for all other commands ("how do i /msg on a specific network?") and b) because mIRC's implementation would likely use /scon internally anyway, so it doesn't matter. The general solution of /scid and /scon is much more powerful:

If you know the cid or connection number:

/scon N echo -s hello, where N is the connection number
or /scid N echo -s hello (where N is the cid number)

If you don't know the cid or connection number:

/scid -a if ($network == SOMENETWORK) echo -s hello

That's how it's done. Just make sure you escape any user data with $():

//var %x = hello $(|) echo -a HACK! | scon 1 echo -s %x

vs.

//var %x = hello $(|) echo -a HACK! | scon 1 echo -s $(%x,0)
© mIRC Discussion Forums