$scid

From Scriptwiki
Revision as of 11:29, 2 July 2007 by Cail (talk | contribs)

Jump to: navigation, search

Returns the connection id, where N is a $cid value.

$scid(N)[.id]


If you specify N = 0, $scid returns total number of open server windows.

If you specify a property which is an identifier, it returns the value of that identifier for that connection. This also works for custom identifiers (see examples).

Note that you cannot use identifiers with brackets (e.g. $asctime(dd)). As workaround, you could make a custom alias returning this value.

Example

echo -a $scid(1).me

This would return your nickname for your first connection.


; make an own alias returning the asctime.
alias moo { return $!asctime(dd) }
; echo this alias for the first connection. 
echo -a $scid(1).moo

See Also