Difference between revisions of "$scid"
From Scriptwiki
m |
|||
Line 12: | Line 12: | ||
[[echo]] -a $scid(1).me | [[echo]] -a $scid(1).me | ||
This would return your nickname for your first connection. | This would return your nickname for your first connection. | ||
− | |||
Line 20: | Line 19: | ||
[[echo]] -a $scid(1).moo | [[echo]] -a $scid(1).moo | ||
+ | == See Also == | ||
+ | * [[$scon]] | ||
[[Category:Multi-server]] | [[Category:Multi-server]] |
Revision as of 10:29, 2 July 2007
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