mIRC Home    About    Download    Register    News    Help

Print Thread
Multiple status/server windows and /echo #200885 14/06/08 06:14 AM
Joined: May 2008
Posts: 329
A
AWEstun Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: May 2008
Posts: 329
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


I registered; you should too.
Re: Multiple status/server windows and /echo [Re: AWEstun] #200913 14/06/08 06:12 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.

Re: Multiple status/server windows and /echo [Re: AWEstun] #200916 14/06/08 06:27 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
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)


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"