From 9bd8711ad413911b63321860a82fc43d6cb760d2 Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Sat, 10 Jul 2010 21:20:12 +0100 Subject: more reformattingm, added a guide.pm for general stuff --- docs/Guide.pm | 87 ++++++++++++ docs/Irssi.pm | 311 ++++++++++++++++++++++++++++++++--------- docs/Irssi/Ban.pm | 15 ++ docs/Irssi/Channel.pm | 36 ++++- docs/Irssi/Chatnet.pm | 24 ++++ docs/Irssi/Client.pm | 20 +++ docs/Irssi/Dcc.pm | 65 +++++++++ docs/Irssi/Ignore.pm | 22 +++ docs/Irssi/Log.pm | 36 +++++ docs/Irssi/Logitem.pm | 6 + docs/Irssi/Notifylist.pm | 21 +++ docs/Irssi/Process.pm | 22 +++ docs/Irssi/Query.pm | 7 + docs/Irssi/Rawlog.pm | 40 ++++++ docs/Irssi/Server.pm | 82 ++++++++++- docs/Irssi/Theme.pm | 11 ++ docs/Irssi/Window.pm | 8 +- docs/Irssi/Windowitem.pm | 14 ++ docs/perl.txt | 355 +---------------------------------------------- 19 files changed, 756 insertions(+), 426 deletions(-) create mode 100644 docs/Guide.pm create mode 100644 docs/Irssi/Ban.pm create mode 100644 docs/Irssi/Chatnet.pm create mode 100644 docs/Irssi/Client.pm create mode 100644 docs/Irssi/Dcc.pm create mode 100644 docs/Irssi/Ignore.pm create mode 100644 docs/Irssi/Notifylist.pm create mode 100644 docs/Irssi/Process.pm create mode 100644 docs/Irssi/Rawlog.pm create mode 100644 docs/Irssi/Theme.pm (limited to 'docs') diff --git a/docs/Guide.pm b/docs/Guide.pm new file mode 100644 index 0000000..78aae10 --- /dev/null +++ b/docs/Guide.pm @@ -0,0 +1,87 @@ +__END__ + +=head1 NAME + +Guide To Irssi Scripting. + +=head1 DESCRIPTION + +=head1 LOADING AND UNLOADING SCRIPTS + +=head2 File Locations + +=head2 Testing + +=head2 Loading + +Scripts are loaded via C>. A default Irssi +configuration also provides the C alias as an alternative to C. + + +=head2 Unloading + +A script can be unloaded via the C> command. The name is +typically the script filename without the F<.pl> extension, so F +becomes C. + +As part of the unloading process, if the script contains a + + sub UNLOAD { + ... + } + +function, it will be run just before the script is unloaded and all variables +destroyed. This can be used to clean up any temporary files, shut down any +network connections or processes, and restore any Irssi modifications made. + +=head1 ANATOMY OF A SCRIPT + +In this section, we develop a very simplistic script + +=head2 Preamble + +=head1 USEFUL THINGS + +=head2 Sharing code between scripts + + +There are 2 main ways for scripts to communicate, either via emitting and +handling Irssi signals, or by calling functions from one another directly. + + +=head2 If In Doubt, Dump! + +C is an extremely good way to inspect Irssi internals if you're +looking for an undocumented feature. + +The C alias by L provides an easy way to +check object fields. + +Dump perl object (e.g. C): + + /alias DUMP script exec use Data::Dumper\; print Data::Dumper->new([\\$0-])->Dump + + +=head1 OTHER RESOURCES + +=over + +=item L + +=item L + +=item L + +=item L + +=item L + +=item L + +=item L + +=item L + +=back diff --git a/docs/Irssi.pm b/docs/Irssi.pm index 263d124..a741b2e 100644 --- a/docs/Irssi.pm +++ b/docs/Irssi.pm @@ -6,39 +6,127 @@ Irssi.pm =head1 DESCRIPTION +L is a console based fullscreen IRC client. It is +written in the C programming language, and can be modified through both +I -- dynamically loadable compiled libraries -- and I, written +in L. + +Modules are not covered in this documentation, other than to note that Perl +scripting support itself may be compiled as a module rather than built directly +into Irssi. The C command can be used from within Irssi to check if Perl +support is available. If not, refer to the F file for how to recompile +irssi. + +The C package is the basis of Perl scripting in Irssi. It does not export any +functions, and requires that all function-calls be fully qualified with the +C> prefix. + =head1 CLASSES +This documentation has been split into a number of pages, each documenting a +particular class or pseudo-class. The following list contains all of these +additional pages. + +=over 4 + +=item L + +=item L + +=item L + +=item L + +=item L + +=item L + +=item L + +=item L + +=item L + +=item L + +=item L + +=item L + +=item L + +=item L + +=item L + +=item L + +=item L + +=item L + +=item L + +=item L + +=back + =head1 METHODS =head2 Accessors -=over +=head3 active_win -=item C -- returns the currently active L object. +C -=item Window active_win() - return active window +returns the currently active L -=item Server active_server() - return server in active window +=head3 active_server -=item windows() - return list of all windows -=item servers() - return list of all servers -=item reconnects() - return list of all server reconnections -=item channels() - return list of all channels +C -=item queries() - return list of all queries +returns the currently active L in active window. -=item commands() - return list of all commands +=head3 windows -=item logs() - return list of all log files +returns a list of all L. -=item ignores() - returns list of all ignores +=head3 servers -=back +returns a list of all L. + +=head3 reconnects + +returns a list of all L. + +=head3 channels + +returns a list of all L. + +=head3 queries + +returns a list of all L. +=head3 commands +returns a list of all L. + +=head3 logs + +returns a list of all L. + +=head3 ignores + +returns a list of all L. + +=head3 dccs + +returns a list of all L =head2 Signals +See also L + Irssi is pretty much based on sending and handling different signals. Like when you receive a message from server, say: @@ -51,16 +139,16 @@ C<"server incoming", SERVER_REC, "nick!user@there PRIVMSG ..."> You probably don't want to use this signal. Default handler for this signal interprets the header and sends a signal: -C<"server event", SERVER_REC, "PRIVMSG ...", "nick", "user@there.org"> +C<"server event", Irssi::Server, "PRIVMSG ...", "nick", "user@there.org"> You probably don't want to use this either, since this signal's default handler parses the event string and sends a signal: -C<"event privmsg", SERVER_REC, "you :blahblah", "nick", "user@there.org"> +C<"event privmsg", Irssi::Server, "you :blahblah", "nick", "user@there.org"> You can at any point grab the signal, do whatever you want to do with it and optionally stop it from going any further by calling -L +L For example: @@ -78,7 +166,7 @@ This will hide all public or private messages that match the regexp C<"free.*porn"> or the sender's nick contain the word "idiot". Yes, you could use /IGNORE instead for both of these C<:)> -You can also use L|/signal_add_last> if you wish to let the +You can also use L if you wish to let the Irssi's internal functions be run before yours. A list of signals that irssi sends can be found in the L documentation. @@ -88,9 +176,9 @@ A list of signals that irssi sends can be found in the L documentation. =head3 Handling Signals -=head4 C +=head4 C -Bind C<$sig_name>' to function C<$func>. The C<$func> argument may be either +Bind C<$sig_name> to function C<$func>. The C<$func> argument may be either a string containing the name of a function to call, or a coderef. For example: @@ -104,46 +192,55 @@ For example: In all cases, the specified function will be passed arguments in C<@_> as specified in L. -=head4 C +=head4 C + +Bind C<$sig_name> to function C<$func>. Call C<$func> as soon as possible when +the signal is raised. -Bind `signal' to function `func'. Call `func' as soon as possible. +=head4 C -=head4 C +Bind C<$sig_name> to function C<$func>. Call C<$func> as late as possible (after +all other signal handlers). -Bind `signal' to function `func'. Call `func' as late as possible. +=head4 C -=head4 C +Unbind C<$sig_name> from function C<$func>. +B coderef? What happens?> -Unbind `signal' from function `func'. =head3 Controlling Signal Propagation -=head4 C +=head4 C + +Send a signal of type C<$sig_name>. Up to 6 parameters can be passed in C<@params>. -Send signal `signal'. You can give 6 parameters at maximum. +=head4 C -=head4 C +Propagate a currently emitted signal, but with different parameters. This only +needs to be called if you wish to change them, otherwise all subsequent handlers +will be invoked as normal. -Continue currently emitted signal with different parameters. +B -=head4 C +=head4 C -Stop the signal that's currently being emitted. +Stop the signal that's currently being emitted, no other handlers after this one will +be called. -=head4 C +=head4 C -Stop the signal with name `signal' that's currently being emitted. +Stop the signal with name C<$sig_name> that is currently being emitted. =head3 Registering New Signals -=head4 C +=head4 C -Register parameter types for one or more signals. -C<%hash> must map one or more signal names to references to arrays -containing 0 to 6 type names. Some recognized type names include -int for integers, intptr for references to integers and string for -strings. For all standard signals see src/perl/perl-signals-list.h -in the source code (this is generated by src/perl/get-signals.pl). +Register parameter types for one or more signals. C<$hashref> must map one or +more signal names to references to arrays containing 0 to 6 type names. Some +recognized type names include int for integers, intptr for references to +integers and string for strings. For all standard signals see +F in the source code (this is generated by +F). For example: @@ -158,46 +255,72 @@ restarting Irssi. B, including modifying the type signature. Registration is required to get any parameters to signals written in Perl and to emit and continue signals from Perl. +B + + + =head2 Commands See also L -command_bind(cmd, func[, category]) - Bind command `cmd' to call function `func'. `category' is the - category where the command is displayed in /HELP. +=head3 Registering Commands -command_runsub(cmd, data, server, item) - Run subcommands for `cmd'. First word in `data' is parsed as - subcommand. `server' is Irssi::Server rec for current - Irssi::Windowitem `item'. - - Call command_runsub in handler function for `cmd' and bind - with command_bind("`cmd' `subcmd'", subcmdfunc[, category]); +=head4 C to call function C<$func>. C<$func> can be +either a string or coderef. C<$category> is an optional string specifying +the category to display the command in when C is used. -command_set_options(cmd, data) - Set options for command `cmd' to `data'. `data' is a string of - space separated words which specify the options. Each word can be - optionally prefixed with one of the following character: +=head4 C - '-': optional argument - '+': argument required - '@': optional numeric argument +Run subcommands for `cmd'. First word in `data' is parsed as +subcommand. `server' is L record for current +L `item'. -command_parse_options(cmd, data) - Parse options for command `cmd' in `data'. It returns a reference to - an hash table with the options and a string with the remaining part - of `data'. On error it returns the undefined value. +Call command_runsub in handler function for `cmd' and bind +with command_bind("`cmd' `subcmd'", subcmdfunc[, category]); -=head3 Registering Commands +B + +=head4 C + +Unbind command C<$cmd> from function C<$func>. =head3 Invoking Commands +=head4 C + +Run the command specified in C<$string> in the currently active context. + +B vs concatenating into the command string?> + +See also L + =head3 Parsing Command Arguments +=head4 C + +Set options for command `cmd' to `data'. `data' is a string of +space separated words which specify the options. Each word can be +optionally prefixed with one of the following character: + +=over + +=item '-': optional argument + +=item '+': argument required + +=item '@': optional numeric argument + +=back + +=head4 C + +Parse options for command `cmd' in `data'. It returns a reference to +an hash table with the options and a string with the remaining part +of `data'. On error it returns the undefined value. + =head2 Settings @@ -306,11 +429,14 @@ combine_level(level, str) =head2 Themes +See also L + You can have user configurable texts in scripts that work just like irssi's internal texts that can be changed in themes. First you'll have to register the formats: + Irssi::theme_register([ 'format_name', '{hilight my perl format!}', 'format2', 'testing.. nick = $0, channel = $1' @@ -328,6 +454,63 @@ For example: $channel->printformat(MSGLEVEL_CRAP, 'format2', 'nick', $channel->{name}); + +=head2 DCC + +See also L + +Dcc +dcc_find_item(type, nick, arg) + Find DCC connection. + +Dcc +dcc_find_by_port(nick, port) + Find DCC connection by port. + + +=head2 Channels + +Channel +channel_find(channel) + Find channel from any server. + +=head2 Ignores + + +ignore_add_rec(ignore) + Add ignore record. + +ignore_update_rec(ignore) + Update ignore record in configuration + +ignore_check(nick, host, channel, text, level) + +=head2 Logging + + +Log +log_create_rec(fname, level) + Create log file. + + +Log +log_find(fname) + Find log with file name. + +=head2 Raw Logging + +Rawlog rawlog_create() + Create a new rawlog. + +rawlog_set_size(lines) + Set the default rawlog size for new rawlogs. + +=head2 Chat-Nets + +chatnet_find(name) + Find chat network with name. + + =head1 COPYRIGHT All the content of this site is copyright © 2000-2010 The Irssi project. diff --git a/docs/Irssi/Ban.pm b/docs/Irssi/Ban.pm new file mode 100644 index 0000000..ba8381f --- /dev/null +++ b/docs/Irssi/Ban.pm @@ -0,0 +1,15 @@ +__END__ + +=head1 NAME + +Irssi::Ban + +=head1 FIELDS + +Ban->{} + ban - The ban + setby - Nick of who set the ban + time - Timestamp when ban was set + + +=head1 METHODS diff --git a/docs/Irssi/Channel.pm b/docs/Irssi/Channel.pm index 10e82f1..bb6789d 100644 --- a/docs/Irssi/Channel.pm +++ b/docs/Irssi/Channel.pm @@ -46,10 +46,34 @@ Server::channels_join(channels, automatic) Channel::destroy() Destroy channel. -Channel -channel_find(channel) - Find channel from any server. -Channel -Server::channel_find(channel) - Find channel from specified server. +Channel::bans() + Return a list of bans in channel. + +Channel::ban_get_mask(nick) + Get ban mask for `nick'. + +Channel::banlist_add(ban, nick, time) + Add a new ban to channel. + +Channel::banlist_remove(ban) + Remove a ban from channel. + + +Nick +Channel::nick_insert(nick, op, voice, send_massjoin) + Add nick to nicklist. + +Channel::nick_remove(nick) + Remove nick from nicklist. + +Nick +Channel::nick_find(nick) + Find nick from nicklist. + +Nick +Channel::nick_find_mask(mask) + Find nick mask from nicklist, wildcards allowed. + +Channel::nicks() + Return a list of all nicks in channel. diff --git a/docs/Irssi/Chatnet.pm b/docs/Irssi/Chatnet.pm new file mode 100644 index 0000000..23fa134 --- /dev/null +++ b/docs/Irssi/Chatnet.pm @@ -0,0 +1,24 @@ +__END__ + +=head1 NAME + +Irssi::Chatnet + +=head1 FIELDS + +Chatnet->{} + type - "CHATNET" text + chat_type - String ID of chat protocol, for example "IRC" + + name - name of chat network + + nick - if not empty, nick preferred in this network + username - if not empty, username preferred in this network + realname - if not empty, realname preferred in this network + + own_host - address to use when connecting this network + autosendcmd - command to send after connecting to this network + + +=head1 METHODS + diff --git a/docs/Irssi/Client.pm b/docs/Irssi/Client.pm new file mode 100644 index 0000000..e07bed7 --- /dev/null +++ b/docs/Irssi/Client.pm @@ -0,0 +1,20 @@ +__END__ + +=head1 NAME + +Irssi::Client + +=head1 FIELDS +Client->{} + nick - nick of the client + host - host of the client + proxy_address - address of the proxy server + server - Irc::Server for which we proxy to this client + pass_sent - whether the client already send a PASS command + user_sent - whether the client already send a USER command + connected - whether the client is connected and ready + want_ctcp - whether the client wants to receive CTCPs + ircnet - network tag of the network we proxy + + +=head1 METHODS diff --git a/docs/Irssi/Dcc.pm b/docs/Irssi/Dcc.pm new file mode 100644 index 0000000..546f112 --- /dev/null +++ b/docs/Irssi/Dcc.pm @@ -0,0 +1,65 @@ +__END__ + +=head1 NAME + +Irssi::Dcc + +=head1 FIELDS + +Dcc->{} + type - Type of the DCC: chat, send, get + orig_type - Original DCC type that was sent to us - same as type except + GET and SEND are swapped + created - Time stamp when the DCC record was created + + server - Server record where the DCC was initiated. + servertag - Tag of the server where the DCC was initiated. + mynick - Our nick to use in DCC chat. + nick - Other side's nick name. + + chat - Dcc chat record if the request came through DCC chat + target - Who the request was sent to - your nick, channel or empty + if you sent the request + arg - Given argument .. file name usually + + addr - Other side's IP address. + port - Port we're connecting in. + + starttime - Unix time stamp when the DCC transfer was started + transfd - Bytes transferred + +Dcc::Chat->{} + id - Unique identifier - usually same as nick + mirc_ctcp - Send CTCPs without the CTCP_MESSAGE prefix + connection_lost - Other side closed connection + +Dcc::Get->{} + (..contains all the same data as core Dcc object..) + size - File size + skipped - Bytes skipped from start (resuming file) + + get_type - What to do if file exists? 0=default, 1=rename, 2=overwrite, + 3=resume + file - The real file name which we use. + file_quoted - 1 if file name was received quoted ("file name") + +Dcc::Send->{} + (..contains all the same data as core Dcc object..) + size - File size + skipped - Bytes skipped from start (resuming file) + + file_quoted - 1 if file name was received quoted ("file name") + waitforend - File is sent, just wait for the replies from the other side + gotalldata - Got all acks from the other end + + +=head1 METHODS + +Dcc::destroy() + Destroy DCC connection. + +Dcc::chat_send(data) + Send `data' to dcc chat. + +Dcc::ctcp_message(target, notice, msg) + Send a CTCP message/notify to target. diff --git a/docs/Irssi/Ignore.pm b/docs/Irssi/Ignore.pm new file mode 100644 index 0000000..108c0ba --- /dev/null +++ b/docs/Irssi/Ignore.pm @@ -0,0 +1,22 @@ +__END__ + +=head1 NAME + +Irssi::Ignore + +=head1 FIELDS + +Ignore->{} + mask - Ignore mask + servertag - Ignore only in server + channels - Ignore only in channels (list of names) + pattern - Ignore text pattern + + level - Ignore level + + exception - This is an exception ignore + regexp - Regexp pattern matching + fullword - Pattern matches only full words + +=head1 METHODS + diff --git a/docs/Irssi/Log.pm b/docs/Irssi/Log.pm index 6787f85..673a183 100644 --- a/docs/Irssi/Log.pm +++ b/docs/Irssi/Log.pm @@ -6,5 +6,41 @@ Irssi::Log =head1 FIELDS +Log->{} + fname - Log file name + real_fname - The actual opened log file (after %d.%m.Y etc. are expanded) + opened - Log file is open + level - Log only these levels + last - Timestamp when last message was written + autoopen - Automatically open log at startup + failed - Opening log failed last time + temp - Log isn't saved to config file + items - List of log items + + =head1 METHODS + +Log::update() + Add log to list of logs / save changes to config file. + + +Log::close() + Destroy log file. + +Log::start_logging() + Open log file and start logging. + +Log::stop_logging() + Close log file. + +Log::item_add(type, name, server) + Add log item to log. + +Log::item_destroy(item) + Remove log item from log. + + +Logitem +Log::item_find(type, item, server) + Find item from log. diff --git a/docs/Irssi/Logitem.pm b/docs/Irssi/Logitem.pm index 21ec401..6db0c7b 100644 --- a/docs/Irssi/Logitem.pm +++ b/docs/Irssi/Logitem.pm @@ -6,5 +6,11 @@ Irssi::Logitem =head1 FIELDS +Logitem->{} + type - 0=target, 1=window refnum + name - Name + servertag - Server tag + + =head1 METHODS diff --git a/docs/Irssi/Notifylist.pm b/docs/Irssi/Notifylist.pm new file mode 100644 index 0000000..5b2628a --- /dev/null +++ b/docs/Irssi/Notifylist.pm @@ -0,0 +1,21 @@ +__END__ + +=head1 NAME + +Irssi::Notifylist + +=head1 FIELDS + +Notifylist->{} + mask - Notify nick mask + away_check - Notify away status changes + idle_check_time - Notify when idle time is reset and idle was bigger + than this (seconds) + ircnets - List of ircnets (strings) the notify is checked + + +=head1 METHODS + +Notifylist::ircnets_match(ircnet) + Returns 1 if notify is checked in `ircnet'. + diff --git a/docs/Irssi/Process.pm b/docs/Irssi/Process.pm new file mode 100644 index 0000000..4b311a2 --- /dev/null +++ b/docs/Irssi/Process.pm @@ -0,0 +1,22 @@ +__END__ + +=head1 NAME + +Irssi::Query + +=head1 FIELDS + +Process->{} + id - ID for the process + name - Name for the process (if given) + args - The command that is being executed + + pid - PID for the executed command + target - send text with /msg ... + target_win - print text to this window + + shell - start the program via /bin/sh + notice - send text with /notice, not /msg if target is set + silent - don't print "process exited with level xx" + +=head1 METHODS diff --git a/docs/Irssi/Query.pm b/docs/Irssi/Query.pm index 953c179..c823a4a 100644 --- a/docs/Irssi/Query.pm +++ b/docs/Irssi/Query.pm @@ -19,3 +19,10 @@ Query->{} =head1 METHODS + +Query::destroy() + Destroy the query. + +Query::query_change_server(server) + Change the active server of the query. + diff --git a/docs/Irssi/Rawlog.pm b/docs/Irssi/Rawlog.pm new file mode 100644 index 0000000..7f89c64 --- /dev/null +++ b/docs/Irssi/Rawlog.pm @@ -0,0 +1,40 @@ +__END__ + +=head1 NAME + +Irssi::Rawlog + +=head1 FIELDS + + +Rawlog->{} + logging - The rawlog is being written to file currently + nlines - Number of lines in rawlog + +=head1 METHODS + + +Rawlog::destroy() + Destroy the rawlog. + +Rawlog::get_lines() + Returns all lines in rawlog. + +Rawlog::open(filename) + Start logging new messages in rawlog to specified file. + +Rawlog::close() + Stop logging to file. + +Rawlog::save(filename) + Save the current rawlog history to specified file. + +Rawlog::input(str) + Send `str' to raw log as input text. + +Rawlog::output(str) + Send `str' to raw log as output text. + +Rawlog::redirect(str) + Send `str' to raw log as redirection text. + diff --git a/docs/Irssi/Server.pm b/docs/Irssi/Server.pm index bb93d20..dfb8500 100644 --- a/docs/Irssi/Server.pm +++ b/docs/Irssi/Server.pm @@ -37,7 +37,10 @@ Server->{} Server::channels() - return list of channels in server Server::queries() - return list of queries in server Server::print(channel, str[, level]) -Server::command(cmd) + +=head2 C + +Run the specified command on this server instance. Server @@ -67,3 +70,80 @@ Server::get_nick_flags() Server::send_message(target, msg, target_type) Sends a message to nick/channel. target_type 0 = channel, 1 = nick + + +Netsplit +Server::netsplit_find(nick, address) + Check if nick!address is on the other side of netsplit. Netsplit records + are automatically removed after 30 minutes (current default).. + +Nick +Server::netsplit_find_channel(nick, address, channel) + Find nick record for nick!address in channel `channel'. + + +Server::dcc_ctcp_message(target, notice, msg) + +Channel +Server::channel_find(channel) + Find channel from specified server. + +Server::ignore_check(nick, host, channel, text, level) + Return 1 if ignoring matched. + + + + +Server::nicks_get_same(nick) + Return all nick objects in all channels in server. List is in format: + Channel, Nick, Channel, ... + +blah + +blah + +blah + + + +blah + +blah + +blah + + +blah + +blah + +blah + + +blah + +blah + +blah + + +blah + +blah + +blah + + +blah + +blah + +blah + + +blah + +blah + +blah + diff --git a/docs/Irssi/Theme.pm b/docs/Irssi/Theme.pm new file mode 100644 index 0000000..f9efc85 --- /dev/null +++ b/docs/Irssi/Theme.pm @@ -0,0 +1,11 @@ +__END__ + +=head1 NAME + +Irssi::Theme + +=head1 FIELDS + + +=head1 METHODS + diff --git a/docs/Irssi/Window.pm b/docs/Irssi/Window.pm index 77b880c..540fae2 100644 --- a/docs/Irssi/Window.pm +++ b/docs/Irssi/Window.pm @@ -94,7 +94,6 @@ Window::item_remove(item) Window::item_destroy(item) Add/remove/destroy window item - Window::set_active() Set window active. @@ -108,3 +107,10 @@ Window::set_level(level) Window::item_prev() Window::item_next() Change to previous/next window item. + + +Window::get_active_name() + Return active item's name, or if none is active, window's name + +Window::item_find(server, name) + Find window item that matches best to given arguments. diff --git a/docs/Irssi/Windowitem.pm b/docs/Irssi/Windowitem.pm index 78919cc..7781a44 100644 --- a/docs/Irssi/Windowitem.pm +++ b/docs/Irssi/Windowitem.pm @@ -39,3 +39,17 @@ Windowitem::print(str[, level]) Windowitem::command(cmd) + +Windowitem::set_active() + Change window item active in parent window. + + +Windowitem::change_server(server) + Change server in window item. + +Windowitem::is_active() + Returns 1 if window item is the active item in parent window. + +Dcc +Windowitem::get_dcc(item) + If `item' is a query of a =nick, return DCC chat record of nick. diff --git a/docs/perl.txt b/docs/perl.txt index 309a808..89588ca 100644 --- a/docs/perl.txt +++ b/docs/perl.txt @@ -147,11 +147,8 @@ command(cmd) -Windowitem -window_item_find(name) +Windowitem window_item_find(name) Server::window_item_find(name) -Window::item_find(server, name) - Find window item that matches best to given arguments. window_refnum_prev(refnum, wrap) window_refnum_next(refnum, wrap) @@ -160,19 +157,6 @@ window_refnum_next(refnum, wrap) windows_refnum_last() Return refnum for last window. -Windowitem::set_active() - Change window item active in parent window. - - -Windowitem::change_server(server) - Change server in window item. - -Windowitem::is_active() - Returns 1 if window item is the active item in parent window. - -Window::get_active_name() - Return active item's name, or if none is active, window's name - *** Server Connects @@ -204,21 +188,6 @@ server_create_conn(address[, port=6667[, password=''[, nick=''[, channels='']]]] *** Chat networks -Chatnet->{} - type - "CHATNET" text - chat_type - String ID of chat protocol, for example "IRC" - - name - name of chat network - - nick - if not empty, nick preferred in this network - username - if not empty, username preferred in this network - realname - if not empty, realname preferred in this network - - own_host - address to use when connecting this network - autosendcmd - command to send after connecting to this network - -chatnet_find(name) - Find chat network with name. *** Server redirections @@ -300,114 +269,18 @@ Server::redirect_event(command, count, arg, remote, failure_signal, signals) *** Channels -Channel->{} - type - "CHANNEL" text - chat_type - String ID of chat protocol, for example "IRC" - - (..contains all the same data as Windowitem above..) - - topic - Channel topic - topic_by - Nick who set the topic - topic_time - Timestamp when the topic was set - - no_modes - Channel is modeless - mode - Channel mode - limit - Max. users in channel (+l mode) - key - Channel key (password) - - chanop - You are channel operator - names_got - /NAMES list has been received - wholist - /WHO list has been received - synced - Channel is fully synchronized - - joined - JOIN event for this channel has been received - left - You just left the channel (for "channel destroyed" event) - kicked - You was just kicked out of the channel (for - "channel destroyed" event) - -Server::channels_join(channels, automatic) - Join to channels in server. `channels' may also contain keys for - channels just like with /JOIN command. `automatic' specifies if this - channel was joined "automatically" or if it was joined because join - was requested by user. If channel join is "automatic", irssi doesn't - jump to the window where the channel was joined. - - -Channel::destroy() - Destroy channel. - -Channel -channel_find(channel) - Find channel from any server. - -Channel -Server::channel_find(channel) - Find channel from specified server. *** Nick list -Nick->{} - type - "NICK" text - chat_type - String ID of chat protocol, for example "IRC" - - nick - Plain nick - host - Host address - realname - Real name - hops - Hop count to the server the nick is using - - gone, serverop - User status, 1 or 0 - op, voice, halfop - Channel status, 1 or 0 - - last_check - timestamp when last checked gone/ircop status. - send_massjoin - Waiting to be sent in a "massjoin" signal, 1 or 0 - -Nick -Channel::nick_insert(nick, op, voice, send_massjoin) - Add nick to nicklist. - -Channel::nick_remove(nick) - Remove nick from nicklist. - -Nick -Channel::nick_find(nick) - Find nick from nicklist. - -Nick -Channel::nick_find_mask(mask) - Find nick mask from nicklist, wildcards allowed. - -Channel::nicks() - Return a list of all nicks in channel. - -Server::nicks_get_same(nick) - Return all nick objects in all channels in server. List is in format: - Channel, Nick, Channel, ... - *** Queries -Query->{} - type - "QUERY" text - chat_type - String ID of chat protocol, for example "IRC" - - (..contains all the same data as Windowitem above..) - - address - Host address of the queries nick - server_tag - Server tag used for this nick (doesn't get erased if - server gets disconnected) - unwanted - 1 if the other side closed or some error occured (DCC chats) Query query_create(chat_type, server_tag, nick, automatic) Create a new query. -Query::destroy() - Destroy the query. - -Query::query_change_server(server) - Change the active server of the query. - Query query_find(nick) Find query from any server. @@ -436,132 +309,17 @@ Server::masks_match(masks, nick, address) matches nick!address. - *** Rawlog - -Rawlog->{} - logging - The rawlog is being written to file currently - nlines - Number of lines in rawlog - -Rawlog -rawlog_create() - Create a new rawlog. - -Rawlog::destroy() - Destroy the rawlog. - -Rawlog::get_lines() - Returns all lines in rawlog. - -rawlog_set_size(lines) - Set the default rawlog size for new rawlogs. - -Rawlog::open(filename) - Start logging new messages in rawlog to specified file. - -Rawlog::close() - Stop logging to file. - -Rawlog::save(filename) - Save the current rawlog history to specified file. - -Rawlog::input(str) - Send `str' to raw log as input text. - -Rawlog::output(str) - Send `str' to raw log as output text. - -Rawlog::redirect(str) - Send `str' to raw log as redirection text. *** Logging -Log->{} - fname - Log file name - real_fname - The actual opened log file (after %d.%m.Y etc. are expanded) - opened - Log file is open - level - Log only these levels - last - Timestamp when last message was written - autoopen - Automatically open log at startup - failed - Opening log failed last time - temp - Log isn't saved to config file - items - List of log items - -Logitem->{} - type - 0=target, 1=window refnum - name - Name - servertag - Server tag - -Log -log_create_rec(fname, level) - Create log file. - -Log::update() - Add log to list of logs / save changes to config file. - -Log -log_find(fname) - Find log with file name. - -Log::close() - Destroy log file. - -Log::start_logging() - Open log file and start logging. - -Log::stop_logging() - Close log file. - -Log::item_add(type, name, server) - Add log item to log. - -Log::item_destroy(item) - Remove log item from log. - -Logitem -Log::item_find(type, item, server) - Find item from log. *** Ignores -Ignore->{} - mask - Ignore mask - servertag - Ignore only in server - channels - Ignore only in channels (list of names) - pattern - Ignore text pattern - - level - Ignore level - - exception - This is an exception ignore - regexp - Regexp pattern matching - fullword - Pattern matches only full words - -ignore_add_rec(ignore) - Add ignore record. - -ignore_update_rec(ignore) - Update ignore record in configuration - -ignore_check(nick, host, channel, text, level) -Server::ignore_check(nick, host, channel, text, level) - Return 1 if ignoring matched. - *** /EXEC processes -Process->{} - id - ID for the process - name - Name for the process (if given) - args - The command that is being executed - - pid - PID for the executed command - target - send text with /msg ... - target_win - print text to this window - - shell - start the program via /bin/sh - notice - send text with /notice, not /msg if target is set - silent - don't print "process exited with level xx" *** @@ -620,96 +378,12 @@ Server::isupport(name) *** IRC channels -Ban->{} - ban - The ban - setby - Nick of who set the ban - time - Timestamp when ban was set - -Channel::bans() - Return a list of bans in channel. - -Channel::ban_get_mask(nick) - Get ban mask for `nick'. - -Channel::banlist_add(ban, nick, time) - Add a new ban to channel. - -Channel::banlist_remove(ban) - Remove a ban from channel. *** DCC -Dcc->{} - type - Type of the DCC: chat, send, get - orig_type - Original DCC type that was sent to us - same as type except - GET and SEND are swapped - created - Time stamp when the DCC record was created - - server - Server record where the DCC was initiated. - servertag - Tag of the server where the DCC was initiated. - mynick - Our nick to use in DCC chat. - nick - Other side's nick name. - - chat - Dcc chat record if the request came through DCC chat - target - Who the request was sent to - your nick, channel or empty - if you sent the request - arg - Given argument .. file name usually - - addr - Other side's IP address. - port - Port we're connecting in. - - starttime - Unix time stamp when the DCC transfer was started - transfd - Bytes transferred - -Dcc::Chat->{} - id - Unique identifier - usually same as nick - mirc_ctcp - Send CTCPs without the CTCP_MESSAGE prefix - connection_lost - Other side closed connection - -Dcc::Get->{} - (..contains all the same data as core Dcc object..) - size - File size - skipped - Bytes skipped from start (resuming file) - get_type - What to do if file exists? 0=default, 1=rename, 2=overwrite, - 3=resume - file - The real file name which we use. - file_quoted - 1 if file name was received quoted ("file name") -Dcc::Send->{} - (..contains all the same data as core Dcc object..) - size - File size - skipped - Bytes skipped from start (resuming file) - - file_quoted - 1 if file name was received quoted ("file name") - waitforend - File is sent, just wait for the replies from the other side - gotalldata - Got all acks from the other end - - -dccs() - return list of all dcc connections - -Dcc::destroy() - Destroy DCC connection. - -Dcc -dcc_find_item(type, nick, arg) - Find DCC connection. - -Dcc -dcc_find_by_port(nick, port) - Find DCC connection by port. - -Dcc -Windowitem::get_dcc(item) - If `item' is a query of a =nick, return DCC chat record of nick. - -Dcc::chat_send(data) - Send `data' to dcc chat. - -Server::dcc_ctcp_message(target, notice, msg) -Dcc::ctcp_message(target, notice, msg) - Send a CTCP message/notify to target. *** Netsplits @@ -730,24 +404,10 @@ Netsplitchannel->{} name - Channel name nick - Nick object -Netsplit -Server::netsplit_find(nick, address) - Check if nick!address is on the other side of netsplit. Netsplit records - are automatically removed after 30 minutes (current default).. - -Nick -Server::netsplit_find_channel(nick, address, channel) - Find nick record for nick!address in channel `channel'. *** Notify list -Notifylist->{} - mask - Notify nick mask - away_check - Notify away status changes - idle_check_time - Notify when idle time is reset and idle was bigger - than this (seconds) - ircnets - List of ircnets (strings) the notify is checked notifies() - Return list of all notifies @@ -770,21 +430,8 @@ notifylist_ison(nick, serverlist) Server::notifylist_ison_server(nick) Check if `nick' is on IRC server. -Notifylist::ircnets_match(ircnet) - Returns 1 if notify is checked in `ircnet'. - *** Proxy clients -Client->{} - nick - nick of the client - host - host of the client - proxy_address - address of the proxy server - server - Irc::Server for which we proxy to this client - pass_sent - whether the client already send a PASS command - user_sent - whether the client already send a USER command - connected - whether the client is connected and ready - want_ctcp - whether the client wants to receive CTCPs - ircnet - network tag of the network we proxy All the content of this site is copyright © 2000-2010 The Irssi project. -- cgit v1.2.3