-
Notifications
You must be signed in to change notification settings - Fork 5
Windowitem
The meaning of "window" should be pretty clear, but "window item" is something I couldn't really figure out a better name for :) They're simply something that's inside a window, a channel or a query usually. Windows can have multiple items inside them. It's possible to create non-channel/query window items too, currently the third possible window item is created by /EXEC -interactive.
In scripts, I think you can quite safely assume that the window item is query or channel if the script is intended to be run in one of them. Stupid users won't probably have other window items, and smart users know where to run the script, or at least later figure out why it didn't work :)
Windowitem->{}
type - Type of the window item, for example "CHANNEL" or "QUERY"
chat_type - String ID of chat protocol, for example "IRC"
server - Active server for item
name - Name of the item
createtime - Time the window item was created
data_level - 0=no new data, 1=text, 2=msg, 3=highlighted text
hilight_color - Color of the last highlighted text
print $str, $level
-
Output a line onto the end of this Windowitem.
$level
is optional and defaults toCLIENTNOTICE
if not specified. An implicit newline is added to the end of$str
. printformat $level, $str, @args
command $str
-
Execute the command in
$string
in the context of this Windowitem. set_active
-
Set this Windowitem to be the active item in its parent Irssi::UI::Window.
change_server $server
-
Change server in window item.
is_active
-
Returns true if this window item is the active item in parent window.
get_dcc $item
-
If
$item
is a query of a =nick, return the DCC chat record of nick. returns Irssi::Irc::Dcc object. window
-
Returns the Irssi::UI::Window that holds this item.
window_create $automatic
-
Create a new window.
activity $data_level $hilight_colour
-
Behaves similarly to
[[Irssi::UI::Window::activity|UI::Window#wiki-activity]]
, but emits the signals"window item hilight"
and"window item activity"
respectively.If multiple windowitems are contained in a single window, then the highest data level takes priority when determining what to display in the act statusbar item.
TODO: Test this more thoroughly, and mention the
/settings
that affect what goes into the act statusbar. (Also, find a good place to put them, probably not here or in UI::Window). parse_special $str, $data, $flags
-
TODO: how is this different from Irssi:: one?
Much of the content on these pages is taken from original Irssi documentation and is Copyright © 2000-2010 The Irssi project. Formatting and additional documentation, examples, etc by Tom Feist and the other editors of this wiki. This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. Please see http://creativecommons.org/licenses/by-sa/2.5/ for details.