# $context

Retrieve the id of the specified irc context

Syntax

    $context[(<server>,<nickname>)]

Description

Returns the irc context id of the IRC context that uses the specified <server> and <nickname>.
This function can find only connected irc contexts. If no context matches the server and nickname, and invalid irc context id is returned (0).
If <server> is an empty string, the first context that matches the specified nickname is returned. If <nickname> is an empty string the first context that uses the specified server is returned. If both parameters are missing this function returns the id of the current irc context, or '0' if the window in that this call is executed is not bound to any irc context. Please note that in this last case you may find an irc context that is 'not connected'. This can only happen if the current window is a console that is currently in "idle" state: no connection has been estabilished yet.
It is a good idea to take a look at the window naming conventions document. This identifier is equivalent to $ic.

Examples

See also
$window, $channel, $console Window naming conventions

Main index, Function index

KVirc 3.0.0 documentation
Generated by root at Thu Apr 29 12:41:05 2004