git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2472 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-02-16 10:39:20 +00:00 committed by cras
parent 82be2070e2
commit 8be6e76c78

View File

@ -1,23 +1,46 @@
Running Perl scripts Installation problems
-------------------- ---------------------
First you'll need to have Perl support on. By default irssi compiles You'll need to have perl support compiled with irssi. make install is
Perl as a module, so /LOAD perl probably helps. If you want to do this also required to make them work. There's quite a many things that may
automatically at startup put the "/LOAD perl" to ~/.irssi/startup file. go wrong with perl:
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.
Place new scripts to ~/.irssi/scripts/ or /usr/local/lib/irssi/scripts/ - 5.004 doesn't work by default, you'll need to edit
directory. Scripts in ~/.irssi/scripts/autorun/ directory are src/perl/irssi-core.pl and remove all lines with "delete_package"
automatically run at startup. 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
Using /PERLFLUSH closes and reopens the perl interpreter removing all You can verify that the perl module is loaded and working with "/LOAD"
Perl scripts from memory. There's currently no way to unload a single command. It should print something like:
Perl script (/SCRIPT REMOVE will probably work soon). You can however
run same script multiple times, and irssi will remove the old version Module Type Submodules
from memory before running the new version. ...
perl static core fe
Running scripts
---------------
Scripts are run with /SCRIPT LOAD command, or the default /RUN alias.
"/SCRIPT" shows list of running script, and /SCRIPT UNLOAD can unload
scripts.
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 Irssi's signals
@ -522,8 +545,8 @@ Server::ischannel(data)
Server::get_nick_flags() Server::get_nick_flags()
Returns nick flag characters in order: op, voice, halfop ("@+%" in IRC). Returns nick flag characters in order: op, voice, halfop ("@+%" in IRC).
Server::send_message(target, msg) Server::send_message(target, msg, target_type)
Sends a message to nick/channel. Sends a message to nick/channel. target_type 0 = channel, 1 = nick
*** Server reconnections *** Server reconnections