mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
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
This commit is contained in:
parent
dc11f23afd
commit
08162d83bf
@ -91,7 +91,7 @@ settings_add_str(section, key, def)
|
|||||||
char *def
|
char *def
|
||||||
CODE:
|
CODE:
|
||||||
perl_settings_add(key);
|
perl_settings_add(key);
|
||||||
settings_add_str(section, key, def);
|
settings_add_str_module(MODULE_NAME"/scripts", section, key, def);
|
||||||
|
|
||||||
void
|
void
|
||||||
settings_add_int(section, key, def)
|
settings_add_int(section, key, def)
|
||||||
@ -100,7 +100,7 @@ settings_add_int(section, key, def)
|
|||||||
int def
|
int def
|
||||||
CODE:
|
CODE:
|
||||||
perl_settings_add(key);
|
perl_settings_add(key);
|
||||||
settings_add_int(section, key, def);
|
settings_add_int_module(MODULE_NAME"/scripts", section, key, def);
|
||||||
|
|
||||||
void
|
void
|
||||||
settings_add_bool(section, key, def)
|
settings_add_bool(section, key, def)
|
||||||
@ -109,7 +109,7 @@ settings_add_bool(section, key, def)
|
|||||||
int def
|
int def
|
||||||
CODE:
|
CODE:
|
||||||
perl_settings_add(key);
|
perl_settings_add(key);
|
||||||
settings_add_bool(section, key, def);
|
settings_add_bool_module(MODULE_NAME"/scripts", section, key, def);
|
||||||
|
|
||||||
void
|
void
|
||||||
settings_remove(key)
|
settings_remove(key)
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "signals.h"
|
#include "signals.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
#include "lib-config/iconfig.h" /* FIXME: remove before .99 */
|
||||||
|
|
||||||
#include "perl-core.h"
|
#include "perl-core.h"
|
||||||
#include "perl-common.h"
|
#include "perl-common.h"
|
||||||
@ -429,6 +430,19 @@ static void sig_autorun(void)
|
|||||||
|
|
||||||
void perl_core_init(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;
|
print_script_errors = 1;
|
||||||
settings_add_str("perl", "perl_use_lib", PERL_USE_LIB);
|
settings_add_str("perl", "perl_use_lib", PERL_USE_LIB);
|
||||||
|
|
||||||
@ -440,8 +454,10 @@ void perl_core_init(void)
|
|||||||
|
|
||||||
if (irssi_init_finished)
|
if (irssi_init_finished)
|
||||||
perl_scripts_autorun();
|
perl_scripts_autorun();
|
||||||
else
|
else {
|
||||||
signal_add("irssi init finished", (SIGNAL_FUNC) sig_autorun);
|
signal_add("irssi init finished", (SIGNAL_FUNC) sig_autorun);
|
||||||
|
settings_check();
|
||||||
|
}
|
||||||
|
|
||||||
module_register("perl", "core");
|
module_register("perl", "core");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user