Site Tools


levelwindow

# $EPIC: levelwindow.txt,v 1.3 2006/08/01 04:11:44 sthalik Exp $

Synopsis:

$levelwindow(<server refnum> <lastlog level descriptions>)

Technical:

  • <server refnum> is, well, a server refnum (reference number)
  • <lastlog level descriptions> is of the same format as /WINDOW LEVEL
  • Only windows connected to the specified server are considered
  • The return value is the window refnum of one of the windows connected to <server refnum> that has one or more of the level descriptions.
  • To avoid ambiguity, it's best that <lastlog level descriptions> only include one level. If you do $levelwindow(0 MSGS,PUBLIC), and MSGS and PUBLIC are different windows, you can't be sure which window you will get.
  • If no windows for the server claim any of the level descriptions, then the return value is -1. This is not as unusual as it might sound. Many script packs set all window's levels to NONE. This function would not be very useful in that kind of situation.
  • Since the DCC lastlog level is global, it is handled specially. The server refnum argument is ignored and any window refnum that has the DCC level is returned.

Practical:

This function can be used to figure out which window that an /xecho -level <level> …. will go to.

Returns:

The refnum for the window that claims any of the lastlog level descriptions for the server specified. -1 if no window can be found that claims the level(s).

Examples:

$levelwindow(1 NOTICE)         Returns the NOTICE window for server 1
$levelwindow(0 MSGS,PUBLIC)    Would return either the MSGS window
                               or the PUBLIC window, but you can't
                               be sure which.

History:

This function first appeared in EPIC4-1.1.12

levelwindow.txt · Last modified: 2006/08/01 04:13 by 127.0.0.1