Beispiel #1
0
static void cmd_script_reset(const char *data)
{
	void *free_arg;
	GHashTable *optlist;

	if (!cmd_get_params(data, &free_arg, 0 | PARAM_FLAG_OPTIONS,
			    "script reset", &optlist))
		return;

	perl_scripts_deinit();
	perl_scripts_init();

	if (g_hash_table_lookup(optlist, "autorun") != NULL)
		perl_scripts_autorun();

	cmd_params_free(free_arg);
}
Beispiel #2
0
void perl_core_init(void)
{
        print_script_errors = 1;
	settings_add_str("perl", "perl_use_lib", PERL_USE_LIB);

	/*PL_perl_destruct_level = 1; - this crashes with some people.. */
	perl_signals_init();
        signal_add_last("script error", (SIGNAL_FUNC) sig_script_error);

	perl_scripts_init();

	if (irssi_init_finished)
		perl_scripts_autorun();
	else {
		signal_add("irssi init finished", (SIGNAL_FUNC) sig_autorun);
		settings_check();
	}

	module_register("perl", "core");
}
Beispiel #3
0
void perl_core_init(void)
{
	int argc = G_N_ELEMENTS(perl_args);
	char **argv = perl_args;

	PERL_SYS_INIT3(&argc, &argv, &environ);
        print_script_errors = 1;
	settings_add_str("perl", "perl_use_lib", PERL_USE_LIB);

	/*PL_perl_destruct_level = 1; - this crashes with some people.. */
	perl_signals_init();
        signal_add_last("script error", (SIGNAL_FUNC) sig_script_error);

	perl_scripts_init();

	if (irssi_init_finished)
		perl_scripts_autorun();
	else {
		signal_add("irssi init finished", (SIGNAL_FUNC) sig_autorun);
		settings_check();
	}

	module_register("perl", "core");
}
Beispiel #4
0
static void cmd_script_reset(const char *data)
{
	perl_scripts_deinit();
	perl_scripts_init();
}