Nice, this is useful. I adapted this to a /gecho command for an alert system but had to add a $cid check.
alias gecho {
set %scid $scid(0)
while ( %scid > 0 ) {
if ($network != $null && $cid !isin %gecho) { set %gecho $addtok(%gecho,$cid,32) | scon %scid echo 4 -a Alert Stuff Here! }
dec %scid
}
unset %gecho
}
That's what you would logically think. However in practice the script would always echo the output into the last active channel on the network in which the script would activate. In this case used as a highlight script for a torrent tracker announce channel, it would never echo into the active channel of the active network in which i was chatting.
/scon
with/echo -a
is mostly pointless. Your active window is active.