diff options
author | Timo Sirainen <cras@irssi.org> | 2001-11-19 21:26:30 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-11-19 21:26:30 +0000 |
commit | 08162d83bfa06f87bede4f0c9791e6139da93681 (patch) | |
tree | b0608902c2394658a9c25d0ac54a9caa96efa5a2 /src/perl/perl-core.c | |
parent | dc11f23afd1598043eeec9cf797eab81ed00cd44 (diff) | |
download | irssi-08162d83bfa06f87bede4f0c9791e6139da93681.zip |
Settings of perl scripts are now stored in "perl/core/scripts" instead of
old "perl/core". The settings are automatically moved to the
perl/core/scripts for now - this will be removed before 0.7.99 comes out.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2101 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/perl-core.c')
-rw-r--r-- | src/perl/perl-core.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/perl/perl-core.c b/src/perl/perl-core.c index e24bff1b..8c3aec7e 100644 --- a/src/perl/perl-core.c +++ b/src/perl/perl-core.c @@ -25,6 +25,7 @@ #include "signals.h" #include "misc.h" #include "settings.h" +#include "lib-config/iconfig.h" /* FIXME: remove before .99 */ #include "perl-core.h" #include "perl-common.h" @@ -429,6 +430,19 @@ static void sig_autorun(void) void perl_core_init(void) { + /* FIXME: remove before .99 - backwards compatibility + fix between CVS versions */ + CONFIG_NODE *node; + + node = iconfig_node_traverse("settings", FALSE); + if (node != NULL) + node = config_node_section(node, "perl/core", -1); + if (node != NULL) { + g_free(node->key); + node->key = g_strdup("perl/core/scripts"); + } + /* ----- */ + print_script_errors = 1; settings_add_str("perl", "perl_use_lib", PERL_USE_LIB); @@ -438,10 +452,12 @@ void perl_core_init(void) perl_scripts_init(); - if (irssi_init_finished) + if (irssi_init_finished) perl_scripts_autorun(); - else - signal_add("irssi init finished", (SIGNAL_FUNC) sig_autorun); + else { + signal_add("irssi init finished", (SIGNAL_FUNC) sig_autorun); + settings_check(); + } module_register("perl", "core"); } |