Represents an xchat context (a pane or a window).
class XChatContext
channel | Channel or (tab name) associated with this context |
server | Server associated with this context (if any) |
commad() | Sends a command to a given context. |
emit() | Emits an XChat print event in an aribrary context. |
getInfo() | Gets generic informations on the given context. |
listNotify() | Lists the notifies active in the given (channel) context. |
listUsers() | Lists the users active in the given (channel) context. |
message() | Sends a PRIVMSG to a given context. |
print() | Prints a line in the given context. |
set() | Activates this context. |
Represents an xchat context (a pane or a window).
This class allow to switch the active context, or to write output, send commands, change the GUI controls of a given context without switching to it.
Channel or (tab name) associated with this context
Server associated with this context (if any)
Sends a command to a given context.
XChatContext.commad( cmd )
cmd | A Complete command as entered on the XChat command line. |
Sends an XChat command to context pointed by this instance, which needs not to be active.
Emits an XChat print event in an aribrary context.
XChatContext.emit( evt, [...] )
evt | A string containing a print event. |
... | Print event parameters (max 10). |
Generates an artificial XChat event in the context pointed by this instance, which needs not to be active.
Gets generic informations on the given context.
XChatContext.getInfo( info )
info | The info key to be retreived. |
Returns: | The value of the required info, or nil if not available. |
Lists the notifies active in the given (channel) context.
XChatContext.listNotify( )
Returns: | A list of notify informations, each being a dictionary of notify data, or nil if nota available. |
Lists the users active in the given (channel) context.
XChatContext.listUsers( )
Returns: | A list of user informations, each being a dictionary of user data, or nil if nota available. |
Sends a PRIVMSG to a given context.
XChatContext.message( msg )
msg | The message to be sent to the context. |
Sends an private message to the channel or user which this context refers to. The context pointed by this instance needs not to be active.
Prints a line in the given context.
XChatContext.print( [...] )
... | Items to print. |
Writes the given items to the context pointed by this item. If the parameters are not string, they are converted to string on the fly by the Virtual Machine.
Activates this context.
XChatContext.set( )
Makes the context pointed by this item to become the current context and to gain focus in the application.