Skip to content
Tom Feist edited this page Apr 22, 2011 · 53 revisions

Irssi Signal Documentation

home |
   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

DESCRIPTION

Perl POD documentation based on the doc/signals.txt documentation supplied with Irssi.

USING SIGNALS

See "Signals" in Irssi

=begin irssi_signal_types

SIGNAL TYPES

  • GList \* of ([^,]*) glistptr_$1

  • GSList \* of (\w+)s gslist_$1

  • char \* string

  • ulong \* ulongptr

  • int \* intptr

  • int int

  • CHATNET_REC iobject

  • SERVER_REC iobject

  • RECONNECT_REC iobject

  • CHANNEL_REC iobject

  • QUERY_REC iobject

  • COMMAND_REC iobject

  • NICK_REC iobject

  • LOG_REC Irssi::Log

  • RAWLOG_REC Irssi::Rawlog

  • IGNORE_REC Irssi::Ignore

  • MODULE_REC Irssi::Module

  • BAN_REC Irssi::Irc::Ban

  • NETSPLIT_REC Irssi::Irc::Netsplit

  • NETSPLIT_SERVER__REC Irssi::Irc::Netsplitserver

  • DCC_REC siobject

  • AUTOIGNORE_REC Irssi::Irc::Autoignore

  • AUTOIGNORE_REC Irssi::Irc::Autoignore

  • NOTIFYLIST_REC Irssi::Irc::Notifylist

  • CLIENT_REC Irssi::Irc::Client

  • THEME_REC Irssi::UI::Theme

  • KEYINFO_REC Irssi::UI::Keyinfo

  • PROCESS_REC Irssi::UI::Process

  • TEXT_DEST_REC Irssi::UI::TextDest

  • WINDOW_REC Irssi::UI::Window

  • WI_ITEM_REC iobject

  • PERL_SCRIPT_REC Irssi::Script

END OF SIGNAL TYPES

=end irssi_signal_types

SIGNAL DEFINITIONS

The 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 @_.

Core

gui exit
None
gui dialog
string $type
string $text
"send command"
string $command,
Irssi::Server $server,
Irssi::Windowitem $window_item

This is sent when a command is entered via the GUI, or by scripts via Irssi::command.

chat-protocols.c

TODO: What are CHAT_PROTOCOL_REC types?

"chat protocol created"
CHAT_PROTOCOL_REC $protocol
"chat protocol updated"
CHAT_PROTOCOL_REC $protocol
"chat protocol destroyed"
CHAT_PROTOCOL_REC $protocol

channels.c

"channel created"
Irssi::Channel $channel
int $automatic
"channel destroyed"
Irssi::Channel $channel

chatnets.c

"chatnet created"
CHATNET_REC $chatnet
"chatnet destroyed"
CHATNET_REC $chatnet

commands.c

"commandlist new"
Irssi::Command $cmd
"commandlist remove"
Irssi::Command $cmd
"error command"
int $err
string $cmd
"send command"
string $args
Irssi::Server $server
Irssi::Windowitem $witem
"send text"
string $line
Irssi::Server $server
Irssi::Windowitem $witem
"command "<cmd>
string $args
Irssi::Server $server
Irssi::Windowitem $witem

TODO: check this "cmd" out?

"default command"
string $args
Irssi::Server $server
Irssi::Windowitem $witem

ignore.c

"ignore created"
Irssi::Ignore $ignore
"ignore destroyed"
Irssi::Ignore $ignore
"ignore changed"
Irssi::Ignore $ignore

log.c

"log new"
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

modules.c

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.c

"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.c

"pidwait"
int $pid
int $status

queries.c

"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.c

"rawlog"
Irssi::Rawlog $raw_log
string $data

server.c

"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

settings.c

"setup changed"
None
"setup reread"
string $fname
"setup saved"
string $fname
int $autosaved

IRC Core

bans.c

"ban type changed"
string $bantype

channels, nicklist

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.c

"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

irc-log.c

"awaylog show"
Irssi::Log $log
int $away_msgs
int $filepos

irc-nicklist.c

"server nick changed"
Irssi::Server $server

irc-servers.c

"event connected"
Irssi::Server $server

irc.c

"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

lag.c

"server lag"
Irssi::Server $server
"server lag disconnect"
Irssi::Server $server

massjoin.c

"massjoin"
Irssi::Channel $channel
List of Irssi::Nick @nicks

TODO: Check this is actually a perl list (array)

mode-lists.c

"ban new"
Irssi::Channel $channel
Irssi::Irc::Ban $ban
"ban remove"
Irssi::Channel $channel
Irssi::Irc::Ban $ban
string $set_by

modes.c

"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.c

"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

IRC Modules

dcc*.c

"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.c

"autoignore new"
Irssi::Server $server
Irssi::Irc::Autoignore $autoignore
"autoignore remove"
Irssi::Server $server
Irssi::Irc::Autoignore $autoignore

flood.c

"flood"
Irssi::Server $server
string $nick
string $host
int $level
string $target

notifylist.c

"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/listen.c

"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

Display (FE) Common

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 $flags contain 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:

completion.c

"complete word"
arrayref of strings $strings_ref

An arrayref which can be modified to add additional completion candidates.

For example:

push @$strings_ref, "another_candidate";
Irssi::Window $window
string $word

The prefix of the word currently being typed.

string $linestart

The contents of the input line up to (but not including) the current word prefix $word.

int $want_space

A scalar reference which can be set to indicate if tab completion of these candidates should be appended with a space.

fe-common-core.c

"irssi init read settings"
None

fe-exec.c

"exec new"
Irssi::UI::Process $process
"exec remove"
Irssi::UI::Process $process
int $status
"exec input"
Irssi::UI::Process $process
string $text

fe-messages.c

"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

keyboard.c

"keyinfo created"
Irssi::UI::Keyinfo $key_info
"keyinfo destroyed"
Irssi::UI::Keyinfo $key_info

printtext.c

"print text"
Irssi::UI::TextDest $text_dest
string $text
string $stripped_text

themes.c

"theme created"
Irssi::UI::Theme $theme
"theme destroyed"
Irssi::UI::Theme $theme

window-activity.c

"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-items.c

"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

windows.c

"window created"
Irssi::UI::Window $window
"window destroyed"
Irssi::UI::Window $window
"window changed"
Irssi::UI::Window $window
Irssi::UI::Window $old_window

TODO: does this fire if you don't change windows? (eg: send a switch command for the window you're already on)

"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

Display (FE) IRC

fe-events.c

"default event numeric"
Irssi::Server $server
string $data
string $nick
string $address

fe-irc-messages.c

"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

fe-modes.c

"message irc mode"
Irssi::Server $server
string $channel
string $nick
string $address
string $mode

dcc/fe-dcc-chat-messages.c

"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

Display (FE) Text

gui-readline.c

"gui key pressed"
int $key

Notes:

Ordinary keys a-zA-Z are their ordinal (ascii) equivalents.

Ctrl-key begins at 1 (C-a), but skips 13?, C-j and C-m both give the same as RET (10). Tab and C-i are equivalent (9). C-o does not appear to send an observable sequence.

BS sends 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

gui-printtext.c

"beep"
None

Perl Scripting

"script error"
Irssi::Script $script
string $error_msg
Clone this wiki locally