diff options
| author | Tom Feist <shabble@cowu.be> | 2010-07-10 20:20:12 +0000 | 
|---|---|---|
| committer | Tom Feist <shabble@cowu.be> | 2010-07-10 20:20:12 +0000 | 
| commit | 9bd8711ad413911b63321860a82fc43d6cb760d2 (patch) | |
| tree | cb6d716bcaa48fed039a1a2a9021b44b3c2d4d10 /docs | |
| parent | Forgot to add a whole bunch of files (diff) | |
| download | irssi-scripts-9bd8711ad413911b63321860a82fc43d6cb760d2.tar.gz irssi-scripts-9bd8711ad413911b63321860a82fc43d6cb760d2.zip | |
more reformattingm, added a guide.pm for general stuff
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/Guide.pm | 87 | ||||
| -rw-r--r-- | docs/Irssi.pm | 311 | ||||
| -rw-r--r-- | docs/Irssi/Ban.pm | 15 | ||||
| -rw-r--r-- | docs/Irssi/Channel.pm | 36 | ||||
| -rw-r--r-- | docs/Irssi/Chatnet.pm | 24 | ||||
| -rw-r--r-- | docs/Irssi/Client.pm | 20 | ||||
| -rw-r--r-- | docs/Irssi/Dcc.pm | 65 | ||||
| -rw-r--r-- | docs/Irssi/Ignore.pm | 22 | ||||
| -rw-r--r-- | docs/Irssi/Log.pm | 36 | ||||
| -rw-r--r-- | docs/Irssi/Logitem.pm | 6 | ||||
| -rw-r--r-- | docs/Irssi/Notifylist.pm | 21 | ||||
| -rw-r--r-- | docs/Irssi/Process.pm | 22 | ||||
| -rw-r--r-- | docs/Irssi/Query.pm | 7 | ||||
| -rw-r--r-- | docs/Irssi/Rawlog.pm | 40 | ||||
| -rw-r--r-- | docs/Irssi/Server.pm | 82 | ||||
| -rw-r--r-- | docs/Irssi/Theme.pm | 11 | ||||
| -rw-r--r-- | docs/Irssi/Window.pm | 8 | ||||
| -rw-r--r-- | docs/Irssi/Windowitem.pm | 14 | ||||
| -rw-r--r-- | docs/perl.txt | 355 | 
19 files changed, 756 insertions, 426 deletions
| 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</SCRIPT LOAD I<filename>>.  A default Irssi +configuration also provides the C</RUN> alias as an alternative to C</SCRIPT +LOAD>. + + +=head2 Unloading + +A script can be unloaded via the C</SCRIPT UNLOAD I<name>> command.  The name is +typically the script filename without the F<.pl> extension, so F<nickcolor.pl> +becomes C</SCRIPT UNLOAD nickcolor>. + +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<Data::Dumper> is an extremely good way to inspect Irssi internals if you're +looking for an undocumented feature. + +The C<DUMP> alias by L<Wouter +Coekaerts|http://wouter.coekaerts.be/site/irssi/aliases> provides an easy way to +check object fields. + +Dump perl object (e.g. C</dump Irssi::active_win>): + +    /alias DUMP script exec use Data::Dumper\; print Data::Dumper->new([\\$0-])->Dump + + +=head1 OTHER RESOURCES + +=over + +=item L<http://irssi.org/documentation/perl> + +=item L<http://irssi.org/documentation/signals> + +=item L<http://irssi.org/documentation/special_vars> + +=item L<http://irssi.org/documentation/formats> + +=item L<http://irssi.org/documentation/settings> + +=item L<http://juerd.nl/site.plp/irssiscripttut> + +=item L<http://irchelp.org/irchelp/rfc/rfc.html> + +=item L<http://wouter.coekaerts.be/site/irssi/irssi> + +=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<Irssi|http://irssi.org> is a console based fullscreen IRC client.  It is +written in the C programming language, and can be modified through both +I<Modules> -- dynamically loadable compiled libraries -- and I<Scripts>, written +in L<Perl|http://perl.org>. + +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</LOAD> command can be used from within Irssi to check if Perl +support is available. If not, refer to the F<INSTALL> file for how to recompile +irssi. + +The C<Irssi> 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<Irssi::I<cmd>> 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<Irssi::Ban> + +=item L<Irssi::Chatnet> + +=item L<Irssi::Chatnet> + +=item L<Irssi::Client> + +=item L<Irssi::Command> + +=item L<Irssi::Dcc> + +=item L<Irssi::Ignore> + +=item L<Irssi::Log> + +=item L<Irssi::Logitem> + +=item L<Irssi::Nick> + +=item L<Irssi::Notifylist> + +=item L<Irssi::Process> + +=item L<Irssi::Query> + +=item L<Irssi::Rawlog> + +=item L<Irssi::Reconnect> + +=item L<Irssi::Script> + +=item L<Irssi::Server> + +=item L<Irssi::Theme> + +=item L<Irssi::Window> + +=item L<Irssi::Windowitem> + +=back +  =head1 METHODS  =head2 Accessors -=over +=head3 active_win -=item C<Irssi::active_win> -- returns the currently active L<Irssi::Window> object. +C<my $win = Irssi::active_win();> -=item Window active_win() - return active window +returns the currently active L<Irssi::Window> -=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<my $server = Irssi::active_server();> -=item queries() - return list of all queries +returns the currently active L<Irssi::Server> 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<windows|Irssi::Window>. -=item ignores() - returns list of all ignores +=head3 servers -=back +returns a list of all L<servers|Irssi::Server>. + +=head3 reconnects + +returns a list of all L<server reconnections|Irssi::Reconnect>. + +=head3 channels + +returns a list of all L<channels|Irssi::Channel>. + +=head3 queries + +returns a list of all L<queries|Irssi::Query>. +=head3 commands +returns a list of all L<commands|Irssi::Command>. + +=head3 logs + +returns a list of all L<log files|Irssi::Log>. + +=head3 ignores + +returns a list of all L<ignores|Irssi::Ignore>. + +=head3 dccs + +returns a list of all L<DCC connections|Irssi::Dcc>  =head2 Signals +See also L<Signals> +  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<Irssi::signal_stop()|Irssi/signal_stop> +L<Irssi::signal_stop|Irssi/signal_stop>  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<C<signal_add_last()>|/signal_add_last> if you wish to let the +You can also use L<Irssi::signal_add_last|/signal_add_last> 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<Signals> documentation. @@ -88,9 +176,9 @@ A list of signals that irssi sends can be found in the L<Signals> documentation.  =head3 Handling Signals -=head4 C<signal_add($sig_name, $func)> +=head4 C<signal_add $sig_name, $func> -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<Signals>. -=head4 C<signal_add_first($sig_name, $func)> +=head4 C<signal_add_first $sig_name, $func> + +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<signal_add_last $sig_name, $func> -=head4 C<signal_add_last(signal, func)> +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<signal_remove $sig_name, $func> -=head4 C<signal_remove(signal, func)> +Unbind C<$sig_name> from function C<$func>. +B<TODO: Can you unbind a signal from a C<sub { ...}> coderef? What happens?> -Unbind `signal' from function `func'.  =head3 Controlling Signal Propagation -=head4 C<signal_emit(signal, ...)> +=head4 C<signal_emit $sig_name, @params> + +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<signal_continue @params> -=head4 C<signal_continue(...)> +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<Should only be called from within a signal handler> -=head4 C<signal_stop()> +=head4 C<signal_stop> -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<signal_stop_by_name(signal)> +=head4 C<signal_stop_by_name $sig_name> -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<signal_register(%hashref)> +=head4 C<signal_register $hashref> -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<src/perl/perl-signals-list.h> in the source code (this is generated by +F<src/perl/get-signals.pl>).  For example: @@ -158,46 +255,72 @@ restarting Irssi. B<TODO: True?>, 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<TODO: What are the complete list of recognised types?> + + +  =head2 Commands  See also L<Irssi::Command> -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<command_bind $cmd, $func, $category -command_unbind(cmd, func) -  Unbind command `cmd' from function `func'. +Bind a command string C<$cmd> 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</HELP> 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<command_runsub $cmd, $data, $server, $item> -  '-': optional argument -  '+': argument required -  '@': optional numeric argument +Run subcommands for `cmd'. First word in `data' is parsed as +subcommand. `server' is L<Irssi::Server> record for current +L<Irssi::Windowitem> `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<TODO: example here> + +=head4 C<command_unbind $cmd, $func> + +Unbind command C<$cmd> from function C<$func>.  =head3 Invoking Commands +=head4 C<command $string> + +Run the command specified in C<$string> in the currently active context. + +B<TODO: passing args in C<@_> vs concatenating into the command string?> + +See also L<Irssi::Server/command $string> +  =head3 Parsing Command Arguments +=head4 C<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: + +=over + +=item  '-': optional argument + +=item   '+': argument required + +=item   '@': optional numeric argument + +=back + +=head4 C<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. +  =head2 Settings @@ -306,11 +429,14 @@ combine_level(level, str)  =head2 Themes +See also L<Irssi::Theme> +  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<Irssi::Dcc> + +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> ... +  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<command $string> + +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> ... -  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. | 
