1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

/SCRIPT EXEC took only one argument. /SCRIPT LIST is now printed with

CLIENTCRAP level. maybe local($/) = '\n' in irssi-core.pl now resets it
correctly? ..


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1684 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-07-29 13:13:16 +00:00 committed by cras
parent 0163f2771f
commit 7c358c1844
2 changed files with 7 additions and 6 deletions

View File

@ -37,7 +37,7 @@ sub eval_file {
local($/) = undef; local($/) = undef;
my $data = <FH>; my $data = <FH>;
close FH; close FH;
$/ = '\n'; local($/) = '\n';
eval_data($data, $id); eval_data($data, $id);
} }

View File

@ -41,7 +41,8 @@ static void cmd_script_exec(const char *data)
char *code; char *code;
void *free_arg; void *free_arg;
if (!cmd_get_params(data, &free_arg, 1 | PARAM_FLAG_OPTIONS, if (!cmd_get_params(data, &free_arg, 1 | PARAM_FLAG_OPTIONS |
PARAM_FLAG_GETREST,
"script exec", &optlist, &code)) "script exec", &optlist, &code))
return; return;
@ -112,7 +113,7 @@ static void cmd_script_list(void)
return; return;
} }
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP,
TXT_SCRIPT_LIST_HEADER); TXT_SCRIPT_LIST_HEADER);
data = g_string_new(NULL); data = g_string_new(NULL);
@ -129,19 +130,19 @@ static void cmd_script_list(void)
} }
} }
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP,
TXT_SCRIPT_LIST_LINE, rec->name, data->str); TXT_SCRIPT_LIST_LINE, rec->name, data->str);
} }
g_string_free(data, TRUE); g_string_free(data, TRUE);
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP,
TXT_SCRIPT_LIST_FOOTER); TXT_SCRIPT_LIST_FOOTER);
} }
static void sig_script_error(PERL_SCRIPT_REC *script, const char *error) static void sig_script_error(PERL_SCRIPT_REC *script, const char *error)
{ {
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, printformat(NULL, NULL, MSGLEVEL_CLIENTERROR,
TXT_SCRIPT_ERROR, script->name); TXT_SCRIPT_ERROR, script == NULL ? "??" : script->name);
printtext(NULL, NULL, MSGLEVEL_CLIENTERROR, "%[-s]%s", error); printtext(NULL, NULL, MSGLEVEL_CLIENTERROR, "%[-s]%s", error);
} }