-
Notifications
You must be signed in to change notification settings - Fork 6
Signals
DESCRIPTION
USING SIGNALS
SIGNAL DEFINITIONS
Core
chat-protocols.c
channels.c
chatnets.c
commands.c
ignore.c
log.c
modules.c
nicklist.c
pidwait.c
queries.c
rawlog.c
server.c
settings.c
IRC Core
bans.c
channels
ctcp.c
irc-log.c
irc-nicklist.c
irc-servers.c
irc.c
lag.c
massjoin.c
mode-lists.c
modes.c
netsplit.c
IRC Modules
dcc*.c
autoignore.c
flood.c
notifylist.c
proxy/listen.c
Display (FE) Common
completion.c
fe-common-core.c
fe-exec.c
fe-messages.c
keyboard.c
printtext.c
themes.c
window-activity.c
window-items.c
windows.c
Display (FE) IRC
fe-events.c
fe-irc-messages.c
fe-modes.c
dcc/fe-dcc-chat-messages.c
Display (FE) Text
gui-readline.c
gui-printtext.c
Perl Scripting
Perl documentation based on the doc/signals.txt documentation supplied with Irssi. This page documents only those signals which are directly accessible to the Perl scripting API (as provided by the generated file src/perl/perl-signals-list.h). This file is auto-generated by the script get-signals.pl
Additional signals are available, but must be used with care, and will require the use of [[Irssi::signal_register()|Irssi#Registering_New_Signals]].
=begin irssi_signal_types-
GList* of ([^,]*)glistptr_$1 -
GSList* of (\w+)sgslist_$1 -
char*string -
ulong*ulongptr -
int*intptr -
intint -
CHATNET_RECiobject -
SERVER_RECiobject -
RECONNECT_RECiobject -
CHANNEL_RECiobject -
QUERY_RECiobject -
COMMAND_RECiobject -
NICK_RECiobject -
LOG_RECIrssi::Log -
RAWLOG_RECIrssi::Rawlog -
IGNORE_RECIrssi::Ignore -
MODULE_RECIrssi::Module -
BAN_RECIrssi::Irc::Ban -
NETSPLIT_RECIrssi::Irc::Netsplit -
NETSPLIT_SERVER__RECIrssi::Irc::Netsplitserver -
DCC_RECsiobject -
AUTOIGNORE_RECIrssi::Irc::Autoignore -
AUTOIGNORE_RECIrssi::Irc::Autoignore -
NOTIFYLIST_RECIrssi::Irc::Notifylist -
CLIENT_RECIrssi::Irc::Client -
THEME_RECIrssi::UI::Theme -
KEYINFO_RECIrssi::UI::Keyinfo -
PROCESS_RECIrssi::UI::Process -
TEXT_DEST_RECIrssi::UI::TextDest -
WINDOW_RECIrssi::UI::Window -
WI_ITEM_RECiobject -
PERL_SCRIPT_RECIrssi::Script
END OF SIGNAL TYPES
=end irssi_signal_typesThe following signals are categorised as in the original documentation, but have been revised to note Perl variable types and class names.
Arguments are passed to signal handlers in the usual way, via @_.
-
gui exitArguments:
-
None
Emitted as the last operation of the
/QUITcommand, and also by the/UPGRADEcommand.
-
-
gui dialog-
string
$type -
string
$text
-
-
"send command"Arguments:
-
string
$command, -
Irssi::Server
$server, -
Irssi::Windowitem
$window_item
Emitted when a command is entered via the GUI, or by scripts via Irssi::command.
-
TODO: What are CHAT_PROTOCOL_REC types? -- defined in core/chat-protocols.c
-
"chat protocol created"-
CHAT_PROTOCOL_REC
$protocol
-
-
"chat protocol updated"-
CHAT_PROTOCOL_REC
$protocol
-
-
"chat protocol destroyed"-
CHAT_PROTOCOL_REC
$protocol
-
-
"channel created"-
Irssi::Channel
$channel -
int
$automatic
-
-
"channel destroyed"-
Irssi::Channel
$channel
-
-
"chatnet created"-
CHATNET_REC
$chatnet
-
-
"chatnet destroyed"-
CHATNET_REC
$chatnet
-
-
"commandlist new"-
Irssi::Command
$cmd
-
-
"commandlist remove"-
Irssi::Command
$cmd
-
-
"error command"Arguments:
-
int
$err -
string
$cmd
Notes: Emitted by
default commandat the end of the signal chain.$erris an enum stored in core/commands.h. These constants are not exported to perl, and are reproduced here:CMDERR_OPTION_UNKNOWN = -3, /* unknown -option */ CMDERR_OPTION_AMBIGUOUS = -2, /* ambiguous -option */ CMDERR_OPTION_ARG_MISSING = -1, /* argument missing for -option */ CMDERR_UNKNOWN, = 0 /* unknown command */ CMDERR_AMBIGUOUS, = 1 /* ambiguous command */ CMDERR_ERRNO, = 2 /* get the error from errno */ CMDERR_NOT_ENOUGH_PARAMS, = 3 /* not enough parameters given */ CMDERR_NOT_CONNECTED, = 4 /* not connected to server */ CMDERR_NOT_JOINED, = 5 /* not joined to any channels in this window */ CMDERR_CHAN_NOT_FOUND, = 6 /* channel not found */ CMDERR_CHAN_NOT_SYNCED, = 7 /* channel not fully synchronized yet */ CMDERR_ILLEGAL_PROTO, = 8 /* requires different chat protocol than the active server */ CMDERR_NOT_GOOD_IDEA, = 9 /* not good idea to do, -yes overrides this */ CMDERR_INVALID_TIME, = 10 /* invalid time specification */ CMDERR_INVALID_CHARSET, = 11 /* invalid charset specification */ CMDERR_EVAL_MAX_RECURSE, = 12 /* eval hit recursion limit */ CMDERR_PROGRAM_NOT_FOUND = 13 /* program not found */
-
-
"send command"Arguments:
-
string
$args -
Irssi::Server
$server -
Irssi::Windowitem
$witem
Emitted when a line is submitted from the input field which begins with one of the characters in
/SET cmdchars.It is emitted first in the command handling chain, before any subsequent
command <cmd>signals. The$argsparameter contains the full input string.
-
-
"send text"Arguments:
-
string
$line -
Irssi::Server
$server -
Irssi::Windowitem
$witem
Emitted when a line is submitted from the input field which does not begin with one of the characters in
/SET cmdchars. The$lineparameter contains the full input line.
-
-
"command <cmd>"Arguments:
-
string
$args -
Irssi::Server
$server -
Irssi::Windowitem
$witem
Emitted when a command matching
<cmd>is entered.$argscontains only the arguments to the command, having stripped the$cmdchar . $cmd.
-
-
"default command"Arguments:
-
string
$args -
Irssi::Server
$server -
Irssi::Windowitem
$witem
Emitted when a line is submitted from the input field which begins with a
$cmdchar, but is not a recognised command. -
-
"ignore created"Arguments:
-
Irssi::Ignore
$ignore
-
-
"ignore destroyed"-
Irssi::Ignore
$ignore
-
-
"ignore changed"-
Irssi::Ignore
$ignore
-
-
"log new"Arguments:
-
Irssi::Log
$log
-
-
"log remove"-
Irssi::Log
$log
-
-
"log create failed"-
Irssi::Log
$log
-
-
"log locked"-
Irssi::Log
$log
-
-
"log started"-
Irssi::Log
$log
-
-
"log stopped"-
Irssi::Log
$log
-
-
"log rotated"-
Irssi::Log
$log
-
-
"log written"-
Irssi::Log
$log -
string
$line
-
TODO: what are these types?
-
"module loaded"-
MODULE_REC
$module -
MODULE_FILE_REC
$module_file
-
-
"module unloaded"-
MODULE_REC
$module -
MODULE_FILE_REC
$module_file
-
-
"module error"-
int
$error -
string
$text -
string
$root_module -
string
$sub_module
-
-
"nicklist new"-
Irssi::Channel
$channel -
Irssi::Nick
$nick
-
-
"nicklist remove"-
Irssi::Channel
$channel -
Irssi::Nick
$nick
-
-
"nicklist changed"-
Irssi::Channel
$channel -
Irssi::Nick
$nick -
string
$old_nick
-
-
"nicklist host changed"-
Irssi::Channel
$channel -
Irssi::Nick
$nick
-
-
"nicklist gone changed"-
Irssi::Channel
$channel -
Irssi::Nick
$nick
-
-
"nicklist serverop changed"-
Irssi::Channel
$channel -
Irssi::Nick
$nick
-
-
"pidwait"-
int
$pid -
int
$status
-
-
"query created"-
Irssi::Query
$query -
int
$automatic
-
-
"query destroyed"-
Irssi::Query
$query
-
-
"query nick changed"-
Irssi::Query
$query -
string
$original_nick
-
-
"window item name changed"-
Irssi::Windowitem
$witem
-
-
"query address changed"-
Irssi::Query
$query
-
-
"query server changed"-
Irssi::Query
$query -
Irssi::Server
$server
-
-
"rawlog"-
Irssi::Rawlog
$raw_log -
string
$data
-
-
"server looking"-
Irssi::Server
$server
-
-
"server connected"-
Irssi::Server
$server
-
-
"server connecting"-
Irssi::Server
$server -
ulongptr
$ip
-
-
"server connect failed"-
Irssi::Server
$server
-
-
"server disconnected"-
Irssi::Server
$server
-
-
"server quit"-
Irssi::Server
$server -
string
$message
-
-
"server sendmsg"-
Irssi::Server
$server -
string
$target -
string
$message -
int
$target_type
-
-
"setup changed"-
None
-
-
"setup reread"-
string
$fname
-
-
"setup saved"-
string
$fname -
int
$autosaved
-
-
"ban type changed"-
string
$bantype
-
TODO: are these actual files? .c?
-
"channel joined"-
Irssi::Channel
$channel
-
-
"channel wholist"-
Irssi::Channel
$channel
-
-
"channel sync"-
Irssi::Channel
$channel
-
-
"channel topic changed"-
Irssi::Channel
$channel
-
-
"ctcp msg"-
Irssi::Server
$server -
string
$args -
string
$nick -
string
$addr -
string
$target
-
-
"ctcp msg "<cmd>-
Irssi::Server
$server -
string
$args -
string
$nick -
string
$addr -
string
$target
-
-
"default ctcp msg"-
Irssi::Server
$server -
string
$args -
string
$nick -
string
$addr -
string
$target
-
-
"ctcp reply"-
Irssi::Server
$server -
string
$args -
string
$nick -
string
$addr -
string
$target
-
-
"ctcp reply "<cmd>-
Irssi::Server
$server -
string
$args -
string
$nick -
string
$addr -
string
$target
-
-
"default ctcp reply"-
Irssi::Server
$server -
string
$args -
string
$nick -
string
$addr -
string
$target
-
-
"ctcp action"-
Irssi::Server
$server -
string
$args -
string
$nick -
string
$addr -
string
$target
-
-
"awaylog show"-
Irssi::Log
$log -
int
$away_msgs -
int
$filepos
-
-
"server nick changed"-
Irssi::Server
$server
-
-
"event connected"-
Irssi::Server
$server
-
-
"server event"-
Irssi::Server
$server -
string
$data -
string
$sender_nick -
string
$sender_addr
-
-
"event "<cmd>-
Irssi::Server
$server -
string
$args -
string
$sender_nick -
string
$sender_addr
-
-
"default event"-
Irssi::Server
$server -
string
$data -
string
$sender_nick -
string
$sender_addr
-
-
"whois default event"-
Irssi::Server
$server -
string
$data -
string
$sender_nick -
string
$sender_addr
-
-
"server incoming"-
Irssi::Server
$server -
string
$data
-
-
"redir "<cmd>-
Irssi::Server
$server -
string
$args -
string
$sender_nick -
string
$sender_addr
-
-
"server lag"-
Irssi::Server
$server
-
-
"server lag disconnect"-
Irssi::Server
$server
-
-
"massjoin"-
Irssi::Channel
$channel -
List of Irssi::Nick
@nicksTODO: Check this is actually a perl list (array)
-
-
"ban new"-
Irssi::Channel
$channel -
Irssi::Irc::Ban
$ban
-
-
"ban remove"-
Irssi::Channel
$channel -
Irssi::Irc::Ban
$ban -
string
$set_by
-
-
"channel mode changed"-
Irssi::Channel
$channel -
string
$set_by
-
-
"nick mode changed"-
Irssi::Channel
$channel -
Irssi::Nick
$nick -
string
$set_by -
string
$mode -
string
$type
-
-
"user mode changed"-
Irssi::Server
$server -
string
$old_mode
-
-
"away mode changed"-
Irssi::Server
$server
-
-
"netsplit server new"-
Irssi::Server
$server -
Irssi::Irc::Netsplitserver
$netsplit_server
-
-
"netsplit server remove"-
Irssi::Server
$server -
Irssi::Irc::Netsplitserver
$netsplit_server
-
-
"netsplit new"-
Irssi::Irc::Netsplit
$netsplit
-
-
"netsplit remove"-
Irssi::Irc::Netsplit
$netsplit
-
-
"dcc ctcp "<cmd>-
string
$args -
Irssi::Dcc
$dcc
-
-
"default dcc ctcp"-
string
$args -
Irssi::Dcc
$dcc
-
-
"dcc unknown ctcp"-
string
$args -
string
$sender -
string
$send_addr
-
-
"dcc reply "<cmd>-
string
$args -
Irssi::Dcc
$dcc
-
-
"default dcc reply"-
string
$args -
Irssi::Dcc
$dcc
-
-
"dcc unknown reply"-
string
$args -
string
$sender -
string
$send_addr
-
-
"dcc chat message"-
Irssi::Dcc
$dcc -
string
$msg
-
-
"dcc created"-
Irssi::Dcc
$dcc
-
-
"dcc destroyed"-
Irssi::Dcc
$dcc
-
-
"dcc connected"-
Irssi::Dcc
$dcc
-
-
"dcc rejecting"-
Irssi::Dcc
$dcc
-
-
"dcc closed"-
Irssi::Dcc
$dcc
-
-
"dcc request"-
Irssi::Dcc
$dcc -
string
$send_addr
-
-
"dcc request send"-
Irssi::Dcc
$dcc
-
-
"dcc chat message"-
Irssi::Dcc
$dcc -
string
$msg
-
-
"dcc transfer update"-
Irssi::Dcc
$dcc
-
-
"dcc get receive"-
Irssi::Dcc
$dcc
-
-
"dcc error connect"-
Irssi::Dcc
$dcc
-
-
"dcc error file create"-
Irssi::Dcc
$dcc -
string
$filename
-
-
"dcc error file open"-
string
$nick -
string
$filename -
int
$errno
-
-
"dcc error get not found"-
string
$nick
-
-
"dcc error send exists"-
string
$nick -
string
$filename
-
-
"dcc error unknown type"-
string
$type
-
-
"dcc error close not found"-
string
$type -
string
$nick -
string
$filename
-
-
"autoignore new"-
Irssi::Server
$server -
Irssi::Irc::Autoignore
$autoignore
-
-
"autoignore remove"-
Irssi::Server
$server -
Irssi::Irc::Autoignore
$autoignore
-
-
"flood"-
Irssi::Server
$server -
string
$nick -
string
$host -
int
$level -
string
$target
-
-
"notifylist new"-
Irssi::Irc::Notifylist
$notify_list
-
-
"notifylist remove"-
Irssi::Irc::Notifylist
$notify_list
-
-
"notifylist joined"-
Irssi::Server
$server -
string
$nick -
string
$user -
string
$host -
string
$real_name -
string
$away_message
-
-
"notifylist away changed"-
Irssi::Server
$server -
string
$nick -
string
$user -
string
$host -
string
$real_name -
string
$away_message
-
-
"notifylist left"-
Irssi::Server
$server -
string
$nick -
string
$user -
string
$host -
string
$real_name -
string
$away_message
-
-
"proxy client connected"-
Irssi::Irc::Client
$client
-
-
"proxy client disconnected"-
Irssi::Irc::Client
$client
-
-
"proxy client command"-
Irssi::Irc::Client
$client -
string
$args -
string
$data
-
-
"proxy client dump"-
Irssi::Irc::Client
$client -
string
$data
-
Requires to work properly:
-
"gui print text"-
Irssi::Window
$window -
int
$fg -
int
$bg -
int
$flags -
string
$text -
Irssi::UI::TextDest
$text_dest
This signal is called multiple times for a given print operation, in a fashion similar to run-length coding. A single line of printed output which varies in colour may emit this signal multiple times, once for each colour change. The
$fg,$bg, and$flagscontain the formatting information for$text. -
-
"gui print text finished"-
Irssi::Window
$window
(Can be used to determine when all
"gui print text"s are sent (not required)) -
Provides signals:
-
"complete word"-
arrayref of strings
$strings_refAn arrayref which can be modified to add additional completion candidates.
For example:
push @$strings_ref, "another_candidate"; -
Irssi::Window
$window -
string
$wordThe prefix of the word currently being typed.
-
string
$linestartThe contents of the input line up to (but not including) the current word prefix
$word. -
int
$want_spaceA scalar reference which can be set to indicate if tab completion of these candidates should be appended with a space.
-
-
"irssi init read settings"-
None
-
-
"exec new"-
Irssi::UI::Process
$process
-
-
"exec remove"-
Irssi::UI::Process
$process -
int
$status
-
-
"exec input"-
Irssi::UI::Process
$process -
string
$text
-
-
"message public"-
Irssi::Server
$server -
string
$msg -
string
$nick -
string
$address -
string
$target
-
-
"message private"-
Irssi::Server
$server -
string
$msg -
string
$nick -
string
$address
-
-
"message own_public"-
Irssi::Server
$server -
string
$msg -
string
$target
-
-
"message own_private"-
Irssi::Server
$server -
string
$msg -
string
$target -
string
$original_target
-
-
"message join"-
Irssi::Server
$server -
string
$channel -
string
$nick -
string
$address
-
-
"message part"-
Irssi::Server
$server -
string
$channel -
string
$nick -
string
$address -
string
$reason
-
-
"message quit"-
Irssi::Server
$server -
string
$nick -
string
$address -
string
$reason
-
-
"message kick"-
Irssi::Server
$server -
string
$channel -
string
$nick -
string
$kicker -
string
$address -
string
$reason
-
-
"message nick"-
Irssi::Server
$server -
string
$new_nick -
string
$old_nick -
string
$address
-
-
"message own_nick"-
Irssi::Server
$server -
string
$new_nick -
string
$old_nick -
string
$address
-
-
"message invite"-
Irssi::Server
$server -
string
$channel -
string
$nick -
string
$address
-
-
"message topic"-
Irssi::Server
$server -
string
$channel -
string
$topic -
string
$nick -
string
$address
-
-
"keyinfo created"-
Irssi::UI::Keyinfo
$key_info
-
-
"keyinfo destroyed"-
Irssi::UI::Keyinfo
$key_info
-
-
"print text"-
Irssi::UI::TextDest
$text_dest -
string
$text -
string
$stripped_text
-
-
"theme created"-
Irssi::UI::Theme
$theme
-
-
"theme destroyed"-
Irssi::UI::Theme
$theme
-
-
"window hilight"-
Irssi::UI::Window
$window
-
-
"window dehilight"-
Irssi::UI::Window
$window
-
-
"window activity"-
Irssi::UI::Window
$window -
int
$old_level
-
-
"window item hilight"-
Irssi::Windowitem
$window_item
-
-
"window item activity"-
Irssi::Windowitem
$window_item -
int
$old_level
-
-
"window item new"-
Irssi::UI::Window
$window -
Irssi::Windowitem
$window_item
-
-
"window item remove"-
Irssi::UI::Window
$window -
Irssi::Windowitem
$window_item
-
-
"window item moved"TODO: Check ordering of arguments from/to here
-
Irssi::UI::Window
$window_from -
Irssi::Windowitem
$window_item -
Irssi::UI::Window
$window_to
-
-
"window item changed"-
Irssi::UI::Window
$window -
Irssi::Windowitem
$window_item
-
-
"window item server changed"-
Irssi::UI::Window
$window -
Irssi::Windowitem
$window_item
-
-
"window created"-
Irssi::UI::Window
$window
-
-
"window destroyed"-
Irssi::UI::Window
$window
-
-
"window changed"-
Irssi::UI::Window
$window -
Irssi::UI::Window
$old_window
-
-
"window changed automatic"-
Irssi::UI::Window
$window
-
-
"window server changed"-
Irssi::UI::Window
$window -
Irssi::Server
$server
-
-
"window refnum changed"-
Irssi::UI::Window
$window -
int
$old_refnum
-
-
"window name changed"-
Irssi::UI::Window
$window
-
-
"window history changed"-
Irssi::UI::Window
$window -
string
$old_name
-
-
"window level changed"-
Irssi::UI::Window
$window
-
-
"default event numeric"-
Irssi::Server
$server -
string
$data -
string
$nick -
string
$address
-
-
"message irc op_public"-
Irssi::Server
$server -
string
$msg -
string
$nick -
string
$address -
string
$target
-
-
"message irc own_wall"-
Irssi::Server
$server -
string
$msg -
string
$target
-
-
"message irc own_action"-
Irssi::Server
$server -
string
$msg -
string
$target
-
-
"message irc action"-
Irssi::Server
$server -
string
$msg -
string
$nick -
string
$address -
string
$target
-
-
"message irc own_notice"-
Irssi::Server
$server -
string
$msg -
string
$target
-
-
"message irc notice"-
Irssi::Server
$server -
string
$msg -
string
$nick -
string
$address -
string
$target
-
-
"message irc own_ctcp"-
Irssi::Server
$server -
string
$cmd -
string
$data -
string
$target
-
-
"message irc ctcp"-
Irssi::Server
$server -
string
$cmd -
string
$data -
string
$nick -
string
$address -
string
$target
-
-
"message irc mode"-
Irssi::Server
$server -
string
$channel -
string
$nick -
string
$address -
string
$mode
-
-
"message dcc own"-
Irssi::Dcc
$dcc -
string
$msg
-
-
"message dcc own_action"-
Irssi::Dcc
$dcc -
string
$msg
-
-
"message dcc own_ctcp"-
Irssi::Dcc
$dcc -
string
$cmd -
string
$data
-
-
"message dcc"-
Irssi::Dcc
$dcc -
string
$msg
-
-
"message dcc action"-
Irssi::Dcc
$dcc -
string
$msg
-
-
"message dcc ctcp"-
Irssi::Dcc
$dcc -
string
$cmd -
string
$data
-
-
"gui key pressed"Arguments:
-
int
$key
Notes:
Ordinary keys
a-zA-Zare their ordinal (ascii) equivalents.Ctrl-key begins at 1 (
C-a), but skips 13?,C-jandC-mboth give the same asRET(10). Tab andC-iare equivalent (9).C-odoes not appear to send an observable sequence.BSsends 127.meta-<key>sends a 27 (ESC) followed by the original key value.Arrow keys send usual meta-stuff (
\e[ABCD).TODO: Turn this into some sort of list
-
-
"beep"Arguments:
-
None
Emitted by the
/BEEPcommand, when an ASCIIBEL(\007/\a) character is printed, or via one of the settings shown with/SET beep.Note: The setting
bell_beepsonly determines whether theBELcharacter produces a beep signal. Other sources are not affected. -
-
"script error"Arguments:
-
Irssi::Script
$script -
string
$error_msg
Emitted when a Perl script generates an error, during either compilation (load-time), or during execution when an unhandled
die(or equivalent fatalCarpcall) occurs. -
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.