From 8be6e76c7884fb71b770eb88fc9c4d78b54319b2 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sat, 16 Feb 2002 10:39:20 +0000 Subject: updated git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2472 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- docs/perl.txt | 63 ++++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 20 deletions(-) diff --git a/docs/perl.txt b/docs/perl.txt index b04e0cb9..16ff18c0 100644 --- a/docs/perl.txt +++ b/docs/perl.txt @@ -1,23 +1,46 @@ - Running Perl scripts - -------------------- - -First you'll need to have Perl support on. By default irssi compiles -Perl as a module, so /LOAD perl probably helps. If you want to do this -automatically at startup put the "/LOAD perl" to ~/.irssi/startup file. -After that you can run scripts with /RUN script (you don't need to give -the .pl extension). If /RUN complains about "unknown command", you -don't have Perl module loaded, or maybe Perl support wasn't compiled at -all. + Installation problems + --------------------- + +You'll need to have perl support compiled with irssi. make install is +also required to make them work. There's quite a many things that may +go wrong with perl: + + - 5.004 doesn't work by default, you'll need to edit + src/perl/irssi-core.pl and remove all lines with "delete_package" + in them + - Compiling fails if you compile irssi with GCC in a system that has + perl compiled with some other C compiler. Very common problem with + non-Linux/BSD systems. You'll need to edit src/perl/*/Makefile files + and remove the parameters that gcc doesn't like. Mostly you'll just + need to keep the -I and -D parameters and add -fPIC. + - If there's any weird crashing at startup, you might have older irssi's + perl libraries installed somewhere, and you should remove those. + - Dynamic libraries don't want to work with some systems, so if your + system complains about some missing symbol in Irssi.so file, configure + irssi with --with-perl-staticlib option (NOT same as --with-perl=static). + - If configure complains that it doesn't find some perl stuff, you're + probably missing libperl.so or libperl.a. In debian, you'll need to do + apt-get install libperl-dev + +You can verify that the perl module is loaded and working with "/LOAD" +command. It should print something like: + +Module Type Submodules +... +perl static core fe + + + Running scripts + --------------- -Place new scripts to ~/.irssi/scripts/ or /usr/local/lib/irssi/scripts/ -directory. Scripts in ~/.irssi/scripts/autorun/ directory are -automatically run at startup. +Scripts are run with /SCRIPT LOAD command, or the default /RUN alias. +"/SCRIPT" shows list of running script, and /SCRIPT UNLOAD can unload +scripts. -Using /PERLFLUSH closes and reopens the perl interpreter removing all -Perl scripts from memory. There's currently no way to unload a single -Perl script (/SCRIPT REMOVE will probably work soon). You can however -run same script multiple times, and irssi will remove the old version -from memory before running the new version. +Scripts should be placed to ~/.irssi/scripts/ or +/usr/local/lib/irssi/scripts/ (or depending on where irssi was +installed) directories. After that /RUN script_name should work, you +don't need to add the .pl prefix. Irssi's signals @@ -522,8 +545,8 @@ Server::ischannel(data) Server::get_nick_flags() Returns nick flag characters in order: op, voice, halfop ("@+%" in IRC). -Server::send_message(target, msg) - Sends a message to nick/channel. +Server::send_message(target, msg, target_type) + Sends a message to nick/channel. target_type 0 = channel, 1 = nick *** Server reconnections -- cgit v1.2.3