diff options
author | Timo Sirainen <cras@irssi.org> | 2001-08-14 00:41:59 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-08-14 00:41:59 +0000 |
commit | 803d8050164eaaefdd52fd4ae967c1e038b3c571 (patch) | |
tree | 615ff88add7d3682beebed692f41f5135c799713 /src/perl | |
parent | f584c1013c74a98bfb43b79280c4ee20b775970a (diff) | |
download | irssi-803d8050164eaaefdd52fd4ae967c1e038b3c571.zip |
Module loading updates - /LOAD shows now also the statically loaded modules.
You can't /LOAD the same module twice. Syntax changed to /LOAD <module>
[<submodule>], /UNLOAD <module> [<submodule>].
NOTE: all modules now need to call register_module() in their init()
function.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1748 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl')
-rw-r--r-- | src/perl/Makefile.am | 1 | ||||
-rw-r--r-- | src/perl/module-fe.h | 4 | ||||
-rw-r--r-- | src/perl/module.h | 2 | ||||
-rw-r--r-- | src/perl/perl-core.c | 3 | ||||
-rw-r--r-- | src/perl/perl-fe.c | 5 |
5 files changed, 13 insertions, 2 deletions
diff --git a/src/perl/Makefile.am b/src/perl/Makefile.am index 8ac1ffa7..e6208352 100644 --- a/src/perl/Makefile.am +++ b/src/perl/Makefile.am @@ -34,6 +34,7 @@ perl_fe_sources = \ noinst_HEADERS = \ module.h \ + module-fe.h \ module-formats.h \ perl-core.h \ perl-common.h \ diff --git a/src/perl/module-fe.h b/src/perl/module-fe.h new file mode 100644 index 00000000..2dc8c283 --- /dev/null +++ b/src/perl/module-fe.h @@ -0,0 +1,4 @@ +#include "module.h" + +#undef MODULE_NAME +#define MODULE_NAME "fe-common/perl" diff --git a/src/perl/module.h b/src/perl/module.h index 9c9f7399..0e95f13d 100644 --- a/src/perl/module.h +++ b/src/perl/module.h @@ -18,4 +18,4 @@ extern PerlInterpreter *my_perl; /* must be called my_perl or some perl implemen #include "common.h" -#define MODULE_NAME "irssi-perl" +#define MODULE_NAME "perl/core" diff --git a/src/perl/perl-core.c b/src/perl/perl-core.c index 0807fc72..914f6eff 100644 --- a/src/perl/perl-core.c +++ b/src/perl/perl-core.c @@ -20,6 +20,7 @@ #define NEED_PERL_H #include "module.h" +#include "modules.h" #include "signals.h" #include "misc.h" @@ -363,6 +364,8 @@ void perl_core_init(void) perl_scripts_init(); perl_scripts_autorun(); + + module_register("perl", "core"); } void perl_core_deinit(void) diff --git a/src/perl/perl-fe.c b/src/perl/perl-fe.c index cbdad663..27ac154b 100644 --- a/src/perl/perl-fe.c +++ b/src/perl/perl-fe.c @@ -18,7 +18,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "module.h" +#include "module-fe.h" +#include "modules.h" #include "module-formats.h" #include "signals.h" #include "commands.h" @@ -230,6 +231,8 @@ void fe_perl_init(void) signal_add("script error", (SIGNAL_FUNC) sig_script_error); signal_add("complete command script load", (SIGNAL_FUNC) sig_complete_load); signal_add("complete command script unload", (SIGNAL_FUNC) sig_complete_unload); + + module_register("perl", "fe"); } void fe_perl_deinit(void) |