diff --git a/AUTHORS b/AUTHORS index d0235c5b..b82b08a3 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1 +1 @@ -Timo Sirainen, cras@irccrew.org +Timo Sirainen, tss@iki.fi diff --git a/NEWS b/NEWS index 949bc9fb..ec40b0a8 100644 --- a/NEWS +++ b/NEWS @@ -4,19 +4,34 @@ v0.7.27 2000-02-26 Timo Sirainen Well, I could have done it ages ago but it wouldn't have had all the flexibility it now has - you should be able to do almost anything with perl scripts. See DOCS/PERL for some documentation - and examples/ directory for couple of example scripts. + and examples/ directory for a couple of example scripts. This is the very first version and I haven't even tested that all functions work correctly! Any suggestions are welcome. I don't really like the values() functions so if someone knows better ways - to them I'd really like to hear. + to do them I'd really like to hear. BTW. I haven't had time to learn Perl well yet, so my scripts are probably not the best examples.. :) + If for some reason you don't wish to use Perl, you can disble it + with giving --disable-perl to configure. + + + /CYCLE [#channel] - parts/rejoins the channel + + Autojoining doesn't switch automatically to the joined channel's + window. + + Server tag generation is a bit smarter now. + + irssi-text: Resizing terminal works now right even if your curses + don't have resizeterm() function. + - /NAMES crashed when done in a non-channel window + - irssi-text: Resizing terminal when irssi had some empty windows + messed them up.. + - toggle_show_nickmode didn't actually do anything :) It was + always on.. + v0.7.26 2000-02-19 Timo Sirainen - - + - Space (and maybe other keys) didn't work when caps/numlock was on. v0.7.25 2000-02-19 Timo Sirainen diff --git a/README b/README index a6bcf1ba..d62d9134 100644 --- a/README +++ b/README @@ -5,15 +5,16 @@ irssi * ABOUT -Irssi is an IRC client made with GTK+ toolkit and (optional) GNOME libraries. -A small text mode version is also somewhat working, there's also a really -simple daemon version which just loads "bot" plugin (which doesn't exist). -I'd also like to see KDE version but someone else will have to do it. +Irssi is an IRC client made with GTK+ toolkit and (optional) GNOME +libraries. A small text mode version is also somewhat working, there's +also a really simple daemon version which just loads "bot" plugin. I'd +also like to see KDE version. * FEATURES -See COMMANDS file for list of all commands irssi knows. +See docs/COMMANDS file for list of (almost) all commands irssi knows. +See docs/PERL for some documentation of Perl scripting. I've been asked quite a lot about why should one use irssi, what does it do that other IRC clients don't? Well, to tell you the truth, I have no idea :) @@ -41,6 +42,7 @@ it does: - Smart nick completion - Configurable logging support - Plugins support, creating plugins is really easy. + - Extremely flexible Perl scripting support. - Lots of nice GUI stuff :) @@ -80,6 +82,7 @@ Configure can use these parameters (all of these defaults to yes): --enable-memdebug Enable memory debugging, great for finding memory leaks --enable-gtk-hebrew Enable Hebrew support - see README-HEBREW + --disable-perl Disable Perl support There's also some others, you can get a full list with ./configure --help @@ -99,4 +102,4 @@ See TODO file if it is already listed in there - if not send me email.. * AUTHOR -Timo Sirainen, cras@irccrew.org, cras/ircnet/#irssi, http://xlife.dhs.org/irssi/ +Timo Sirainen, tss@iki.fi, cras/ircnet/#irssi, http://xlife.dhs.org/irssi/ diff --git a/TODO b/TODO index c62fdea9..7c7b9c3c 100644 --- a/TODO +++ b/TODO @@ -52,11 +52,7 @@ - online help, documentation, ... - plugins: - - perl plugin .. implementation problems, C's structures need to be - handled some way .. like for server structure get_address(), - get_port(), set_address(), set_port() etc.. - other scripting plugins would be easier? scheme, tcl, pythong? - sula premirex uses scheme, it would probably be pretty easy to learn - from it how to do it to irssi :) + - scheme, tcl, python scripting? eggdrop/epic compatible scripting? - IRC bot, eggdrop is too old, needs a replacement ;) (started) - DCC file server, I'm not too excited about this, maybe someone else wants to do it.. diff --git a/docs/PERL b/docs/PERL index 9a03e589..31ca7439 100644 --- a/docs/PERL +++ b/docs/PERL @@ -127,7 +127,7 @@ Server::values() "connection_lost" - Did we lose the connection (1) or was the connection meant to be disconnected (0) Example: - %server_info = %{$Irssi::cur_server->values()}; + %server_info = %{Irssi::cur_server->values()}; Irssi::print("Current server = ".$server_info{'address'}); Server server_connect(address, [port=6667, [password='', [nick='']]]) @@ -195,7 +195,7 @@ Server::redirect_event(arg, last, ...) Example: $server->send_raw('WHOIS :cras'); - $server->redirect_event('cras', 2 + $server->redirect_event('cras', 2, "event 318", "redir end_of_whois", -1, "event 402", "redir no_such_server", -1, "event 401", "redir no_such_nick", 1, @@ -242,6 +242,7 @@ Channel::values() has keys: "name" - channel name "type" - channel type ("channel", "query", "dcc chat", "empty") + "password" - channel password Channel Server::channel_create(channel, type, automatic) Create new channel with name `channel'. `type' is one of: @@ -253,7 +254,7 @@ Channel Server::channel_create(channel, type, automatic) `automatic' means that channel is created "automatically" and Irssi will NOT change the active window to it. -Channel::_destroy() +Channel::destroy() Destroy channel. Channel::change_name(name) diff --git a/examples/autorejoin.pl b/examples/autorejoin.pl new file mode 100644 index 00000000..34f6cfe3 --- /dev/null +++ b/examples/autorejoin.pl @@ -0,0 +1,23 @@ +# automatically rejoin to channel after kicked + +# NOTE: I personally don't like this feature, in most channels I'm in it +# will just result as ban. You've probably misunderstood the idea of /KICK +# wrong if you kick/get kicked all the time "just for fun" ... + +use Irssi; + +sub event_rejoin_kick { + my ($data, $server) = @_; + my ($channel) = split(/ +/, $data); + + # check if channel has password + $chanrec = $server->channel_find($channel); + if ($chanrec) { + %cvals = %{$chanrec->values()}; + $password = $cvals{'key'}; + } + + $server->send_raw("JOIN $channel $password"); +} + +Irssi::signal_add('event kick', 'event_rejoin_kick'); diff --git a/examples/hello.pl b/examples/hello.pl new file mode 100644 index 00000000..de53c3ab --- /dev/null +++ b/examples/hello.pl @@ -0,0 +1,12 @@ +# "Hello, world!" script :) /hello sends "Hello, world!" to + +use Irssi; + +sub cmd_hello { + my ($data, $server, $channel) = @_; + + $server->command("/msg $data Hello, world!"); + return 1; +} + +Irssi::command_bind('hello', '', 'cmd_hello'); diff --git a/examples/privmsg.pl b/examples/privmsg.pl new file mode 100644 index 00000000..97842f4b --- /dev/null +++ b/examples/privmsg.pl @@ -0,0 +1,19 @@ +# listen PRIVMSGs - send a notice to yourself when your nick is meantioned + +use Irssi; + +sub event_privmsg { + my ($data, $server, $nick, $address) = @_; + my ($target, $text) = $data =~ /^(\S*)\s:(.*)/; + + return if (!Irssi::is_channel($target)); + + %sinfo = %{$server->values()}; + $mynick = $sinfo{'nick'}; + + return if ($text !~ /\b$mynick\b/); + + $server->command("/notice $mynick In channel $target, $nick!$address said: $text"); +} + +Irssi::signal_add("event privmsg", "event_privmsg"); diff --git a/examples/realname.pl b/examples/realname.pl new file mode 100644 index 00000000..1150d5e2 --- /dev/null +++ b/examples/realname.pl @@ -0,0 +1,34 @@ +# /RN - display real name of nick + +use Irssi; + +sub cmd_realname { + my ($data, $server, $channel) = @_; + + $server->send_raw("WHOIS :$data"); + + # ignore all whois replies except "No such nick" or the + # first line of the WHOIS reply + $server->redirect_event($data, 2, + "event 318", "event empty", -1, + "event 402", "event 402", -1, + "event 401", "event 401", 1, + "event 311", "redir whois", 1, + "event 301", "event empty", 1, + "event 312", "event empty", 1, + "event 313", "event empty", 1, + "event 317", "event empty", 1, + "event 319", "event empty", 1); + return 1; +} + +sub event_rn_whois { + my ($num, $nick, $user, $host, $empty, $realname) = split(/ +/, $_[0], 6); + $realname =~ s/^://; + + Irssi::print("%_$nick%_ is $realname"); + return 1; +} + +Irssi::command_bind('rn', '', 'cmd_realname'); +Irssi::signal_add('redir whois', 'event_rn_whois'); diff --git a/irssi.spec.in b/irssi.spec.in index 25ab92df..af7246ec 100644 --- a/irssi.spec.in +++ b/irssi.spec.in @@ -1,8 +1,8 @@ -# $Revision: 1.6 $, $Date: 2000/01/27 19:03:28 $ +# $Revision: 1.7 $, $Date: 2000/02/25 17:03:15 $ Name: irssi Version: @VERSION@ Release: 1 -Vendor: Timo Sirainen +Vendor: Timo Sirainen Summary: Irssi is a IRC client Summary(pl): Irssi - klient IRC Copyright: GPL @@ -24,12 +24,12 @@ BuildRoot: /tmp/%{name}-%{version}-root %description Irssi is a textUI IRC client with IPv6 support -by Timo Sirainen . +by Timo Sirainen . More information can be found at http://xlife.dhs.org/irssi/. %description -l pl Irssi jest tekstowym klientem IRC ze wsparciem dla IPv6. -Napisany został przez Timo Strainen +Napisany został przez Timo Strainen Więcej informacji można znaleść pod adresem http://xlife.dhs.org/irssi/ @@ -42,12 +42,12 @@ Requires: %{name} = %{version} %description GNOME Irssi is a GTK based (with GNOME) GUI IRC client with IPv6 support -by Timo Sirainen . +by Timo Sirainen . More information can be found at http://xlife.dhs.org/irssi/. %description GNOME -l pl Irssi jest graficznym klientem IRC ze wsparciem dla IPv6 pracującym -w środowisku GNOME. Napisany został przez Timo Sirainen . +w środowisku GNOME. Napisany został przez Timo Sirainen . Więcej informacji można znaleść pod adresem http://xlife.dhs.org/irssi/ @@ -110,6 +110,9 @@ rm -rf $RPM_BUILD_ROOT All below listed persons can be reached on @pld.org.pl $Log: irssi.spec.in,v $ +Revision 1.7 2000/02/25 17:03:15 cras +Irssi 0.7.27 released. + Revision 1.6 2000/01/27 19:03:28 cras fixes by vkoivula@saunalahti.fi diff --git a/po/fi.po b/po/fi.po index bdf8a570..8cf4dd81 100644 --- a/po/fi.po +++ b/po/fi.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-02-19 16:33+0200\n" +"POT-Creation-Date: 2000-02-19 18:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/fr.po b/po/fr.po index 2c88fbab..9c336527 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: irssi-0.7.23\n" -"POT-Creation-Date: 2000-02-19 16:33+0200\n" +"POT-Creation-Date: 2000-02-19 18:58+0200\n" "PO-Revision-Date: 2000-01-26 16:33+0100\n" "Last-Translator: Julien Boulnois \n" "Language-Team: LANGUAGE \n" diff --git a/po/pl.po b/po/pl.po index 00945a73..891807e8 100644 --- a/po/pl.po +++ b/po/pl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-02-19 16:33+0200\n" +"POT-Creation-Date: 2000-02-19 18:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/pt_BR.po b/po/pt_BR.po index a1b7a273..c4f01ef1 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: irssi 0.7.23\n" -"POT-Creation-Date: 2000-02-19 16:33+0200\n" +"POT-Creation-Date: 2000-02-19 18:58+0200\n" "PO-Revision-Date: 2000-02-10 09:50-0200\n" "Last-Translator: Frédéric L. W. Meunier \n" "Language-Team: Brazilian Portuguese \n" diff --git a/src/common.h b/src/common.h index 26e3e8c6..2c8b83d6 100644 --- a/src/common.h +++ b/src/common.h @@ -1,7 +1,7 @@ #ifndef __COMMON_H #define __COMMON_H -#define IRSSI_AUTHOR "Timo Sirainen " +#define IRSSI_AUTHOR "Timo Sirainen " #define IRSSI_WEBSITE "http://xlife.dhs.org/irssi/" #ifdef HAVE_CONFIG_H