Perl working again, better than ever (unless there's bugs :)

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@191 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-04-28 08:07:42 +00:00 committed by cras
commit a5a66264de
43 changed files with 1510 additions and 1004 deletions

View file

@ -38,6 +38,9 @@ void autorun_deinit(void);
void fe_core_log_init(void);
void fe_core_log_deinit(void);
void fe_log_init(void);
void fe_log_deinit(void);
void fe_server_init(void);
void fe_server_deinit(void);

View file

@ -1,7 +1,7 @@
/*
fe-log.c : irssi
Copyright (C) 1999 Timo Sirainen
Copyright (C) 1999-2000 Timo Sirainen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View file

@ -83,5 +83,6 @@ FORMAT_REC fecommon_core_formats[] =
/* ---- */
{ NULL, N_("Misc"), 0 },
{ "not_toggle", N_("Value must be either ON, OFF or TOGGLE"), 0 }
{ "not_toggle", N_("Value must be either ON, OFF or TOGGLE"), 0 },
{ "perl_error", N_("Perl error: $0"), 1, { 0 } }
};

View file

@ -55,7 +55,8 @@ enum {
IRCTXT_FILL_6,
IRCTXT_NOT_TOGGLE
IRCTXT_NOT_TOGGLE,
IRCTXT_PERL_ERROR
};
extern FORMAT_REC fecommon_core_formats[];

View file

@ -807,23 +807,30 @@ static int sig_check_daychange(void)
return TRUE;
}
static void sig_gui_dialog(const char *type, const char *text)
void printtext_multiline(void *server, const char *channel, int level, const char *format, const char *text)
{
char **lines, **tmp;
if (g_strcasecmp(type, "warning") == 0)
type = _("%_Warning:%_ %s");
else if (g_strcasecmp(type, "error") == 0)
type = _("%_Error:%_ %s");
else
type = "%s";
lines = g_strsplit(text, "\n", -1);
for (tmp = lines; *tmp != NULL; tmp++)
printtext(NULL, NULL, MSGLEVEL_NEVER, type, *tmp);
printtext(NULL, NULL, MSGLEVEL_NEVER, format, *tmp);
g_strfreev(lines);
}
static void sig_gui_dialog(const char *type, const char *text)
{
char *format;
if (g_strcasecmp(type, "warning") == 0)
format = _("%_Warning:%_ %s");
else if (g_strcasecmp(type, "error") == 0)
format = _("%_Error:%_ %s");
else
format = "%s";
printtext_multiline(NULL, NULL, MSGLEVEL_NEVER, format, text);
}
static void read_settings(void)
{
toggle_show_timestamps = settings_get_bool("toggle_show_timestamps");

View file

@ -53,6 +53,7 @@ void printformat(void *server, const char *channel, int level, int formatnum, ..
void printformat_format(FORMAT_REC *formats, void *server, const char *channel, int level, int formatnum, ...);
void printtext(void *server, const char *channel, int level, const char *str, ...);
void printtext_multiline(void *server, const char *channel, int level, const char *format, const char *text);
void printbeep(void);
void printtext_init(void);