alias test {
%c = $1
%d = $gcid(%c)
if (%d == $null) { echo -a You are not connected to " $+ %c $+ ".) | halt }
else scon %d <command>
}
alias gcid {
var %a = 1
while $scon(%a).network {
if ($ifmatch == $1) { return $scon(%a) }
inc %a
}
}
/test <networkname>
;aliases kept seperate as I need $gcid for something else also;