Skip to content
Tom Feist edited this page Apr 25, 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"

    Arguments:

    Emitted 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

chatnets.c

  • "chatnet created"

    • CHATNET_REC $chatnet

  • "chatnet destroyed"

    • CHATNET_REC $chatnet

commands.c

  • "commandlist new"

  • "commandlist remove"

  • "error command"

    Arguments:

    • int $err

    • string $cmd

    Notes: Emitted by default command at the end of the signal chain.

    $err is an enum stored in core/commands.h. 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:

    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<gt> signals. The $args parameter contains the full input string.

  • "send text"

    Arguments:

    Emitted when a line is submitted from the input field which does not begin with one of the characters in /SET cmdchars. The $line parameter contains the full input line.

  • "command <cmd>"

    Arguments:

    Emitted when a command matching <cmd> is entered. $args contains only the arguments to the command, having stripped the $cmdchar . $cmd.

  • "default command"

    Arguments:

    Emitted when a line is submitted from the input field which begins with a $cmdchar, but is not a recognised command.

ignore.c

log.c

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

pidwait.c

  • "pidwait"

    • int $pid

    • int $status

queries.c

rawlog.c

server.c

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?

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"

irc-nicklist.c

irc-servers.c

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"

  • "redir "<cmd>

    • Irssi::Server $server

    • string $args

    • string $sender_nick

    • string $sender_addr

lag.c

massjoin.c

mode-lists.c

modes.c

netsplit.c

IRC Modules

dcc*.c

  • "dcc ctcp "<cmd>

  • "default dcc ctcp"

  • "dcc unknown ctcp"

    • string $args

    • string $sender

    • string $send_addr

  • "dcc reply "<cmd>

  • "default dcc reply"

  • "dcc unknown reply"

    • string $args

    • string $sender

    • string $send_addr

  • "dcc chat message"

  • "dcc created"

  • "dcc destroyed"

  • "dcc connected"

  • "dcc rejecting"

  • "dcc closed"

  • "dcc request"

  • "dcc request send"

  • "dcc chat message"

  • "dcc transfer update"

  • "dcc get receive"

  • "dcc error connect"

  • "dcc error file create"

  • "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

flood.c

  • "flood"

    • Irssi::Server $server

    • string $nick

    • string $host

    • int $level

    • string $target

notifylist.c

  • "notifylist new"

  • "notifylist remove"

  • "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

Display (FE) Common

Requires to work properly:

  • "gui print text"

    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"

    (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

fe-messages.c

  • "message public"

    • Irssi::Server $server

    • string $msg

    • string $nick

    • string $address

    • string $target

  • "message private"

  • "message own_public"

  • "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

printtext.c

themes.c

window-activity.c

window-items.c

windows.c

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"

  • "message irc own_action"

  • "message irc action"

    • Irssi::Server $server

    • string $msg

    • string $nick

    • string $address

    • string $target

  • "message irc own_notice"

  • "message irc notice"

    • Irssi::Server $server

    • string $msg

    • string $nick

    • string $address

    • string $target

  • "message irc own_ctcp"

  • "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"

  • "message dcc own_action"

  • "message dcc own_ctcp"

  • "message dcc"

  • "message dcc action"

  • "message dcc ctcp"

Display (FE) Text

gui-readline.c

  • "gui key pressed"

    Arguments:

    • 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

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 327:

Unterminated C<...> sequence

Clone this wiki locally