From d00c99f292f7539c2a83198e8c0d8181dc5ee766 Mon Sep 17 00:00:00 2001 From: Emmanuel Bouthenot Date: Thu, 16 Jun 2005 17:02:37 +0000 Subject: [PATCH] errors while loading perl scripts are now displayed in server buffer (instead of current buffer) --- ChangeLog | 3 ++- src/plugins/perl/wee-perl.c | 6 +++--- weechat/ChangeLog | 3 ++- weechat/src/plugins/perl/wee-perl.c | 6 +++--- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index bcedee476..70b7ec2d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,7 +5,8 @@ ChangeLog - 2005-06-16 Version 0.1.3 (under dev!): - * in python scripts, all messages written in stdin and stderr are redirect in server window + * errors while loading perl scripts are now displayed in server buffer (instead of current buffer) + * in python scripts, all messages written in stdin and stderr are redirect in server buffer * fix a filename error while loading a python script manually * fixed plugins "print" and "prnt" functions: now ok for writing on server buffers diff --git a/src/plugins/perl/wee-perl.c b/src/plugins/perl/wee-perl.c index 2bf80b997..518c9ee70 100644 --- a/src/plugins/perl/wee-perl.c +++ b/src/plugins/perl/wee-perl.c @@ -832,19 +832,19 @@ wee_perl_init () " my $content = wee_perl_load_file ($filename);" " if ($content eq \"__WEECHAT_ERROR__\")" " {" - " weechat::print \"WeeChat Error: Perl script '$filename' not found.\\n\";" + " weechat::print \"WeeChat Error: Perl script '$filename' not found.\\n\", \"\";" " return 1;" " }" " eval $content;" " if ($@)" " {" - " weechat::print \"WeeChat error: unable to load Perl script '$filename':\\n\";" + " weechat::print \"WeeChat error: unable to load Perl script '$filename':\\n\", \"\";" " weechat::print \"$@\\n\";" " return 2;" " }" " return 0;" "}" - "$SIG{__WARN__} = sub { weechat::print \"$_[0]\n\"; };" + "$SIG{__WARN__} = sub { weechat::print \"$_[0]\n\", \"\"; };" }; wee_log_printf (_("Loading %s module \"weechat\"\n"), "Perl"); diff --git a/weechat/ChangeLog b/weechat/ChangeLog index bcedee476..70b7ec2d3 100644 --- a/weechat/ChangeLog +++ b/weechat/ChangeLog @@ -5,7 +5,8 @@ ChangeLog - 2005-06-16 Version 0.1.3 (under dev!): - * in python scripts, all messages written in stdin and stderr are redirect in server window + * errors while loading perl scripts are now displayed in server buffer (instead of current buffer) + * in python scripts, all messages written in stdin and stderr are redirect in server buffer * fix a filename error while loading a python script manually * fixed plugins "print" and "prnt" functions: now ok for writing on server buffers diff --git a/weechat/src/plugins/perl/wee-perl.c b/weechat/src/plugins/perl/wee-perl.c index 2bf80b997..518c9ee70 100644 --- a/weechat/src/plugins/perl/wee-perl.c +++ b/weechat/src/plugins/perl/wee-perl.c @@ -832,19 +832,19 @@ wee_perl_init () " my $content = wee_perl_load_file ($filename);" " if ($content eq \"__WEECHAT_ERROR__\")" " {" - " weechat::print \"WeeChat Error: Perl script '$filename' not found.\\n\";" + " weechat::print \"WeeChat Error: Perl script '$filename' not found.\\n\", \"\";" " return 1;" " }" " eval $content;" " if ($@)" " {" - " weechat::print \"WeeChat error: unable to load Perl script '$filename':\\n\";" + " weechat::print \"WeeChat error: unable to load Perl script '$filename':\\n\", \"\";" " weechat::print \"$@\\n\";" " return 2;" " }" " return 0;" "}" - "$SIG{__WARN__} = sub { weechat::print \"$_[0]\n\"; };" + "$SIG{__WARN__} = sub { weechat::print \"$_[0]\n\", \"\"; };" }; wee_log_printf (_("Loading %s module \"weechat\"\n"), "Perl");