mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-20 17:31:30 +00:00
[Perl] Fix perl for later Linux releases v5.24.1
This commit is contained in:
parent
808654743c
commit
00604722bb
@ -237,6 +237,7 @@ void Embperl::init_eval_file(void)
|
|||||||
{
|
{
|
||||||
eval_pv(
|
eval_pv(
|
||||||
"our %Cache;"
|
"our %Cache;"
|
||||||
|
"no warnings;"
|
||||||
"use Symbol qw(delete_package);"
|
"use Symbol qw(delete_package);"
|
||||||
"sub eval_file {"
|
"sub eval_file {"
|
||||||
"my($package, $filename) = @_;"
|
"my($package, $filename) = @_;"
|
||||||
@ -247,7 +248,8 @@ void Embperl::init_eval_file(void)
|
|||||||
" return;"
|
" return;"
|
||||||
"} else {"
|
"} else {"
|
||||||
// we 'my' $filename,$mtime,$package,$sub to prevent them from changing our state up here.
|
// we 'my' $filename,$mtime,$package,$sub to prevent them from changing our state up here.
|
||||||
" eval(\"package $package; my(\\$filename,\\$mtime,\\$package,\\$sub); \\$isloaded = 1; require '$filename'; \");"
|
" eval(\"package $package; my(\\$filename,\\$mtime,\\$package,\\$sub); \\$isloaded = 1; require './$filename'; \");"
|
||||||
|
// " print $@ if $@;"
|
||||||
/* "local *FH;open FH, $filename or die \"open '$filename' $!\";"
|
/* "local *FH;open FH, $filename or die \"open '$filename' $!\";"
|
||||||
"local($/) = undef;my $sub = <FH>;close FH;"
|
"local($/) = undef;my $sub = <FH>;close FH;"
|
||||||
"my $eval = qq{package $package; sub handler { $sub; }};"
|
"my $eval = qq{package $package; sub handler { $sub; }};"
|
||||||
|
|||||||
@ -99,12 +99,17 @@ XS(XS_EQEmuIO_PRINT)
|
|||||||
/* Strip newlines from log message 'str' */
|
/* Strip newlines from log message 'str' */
|
||||||
*std::remove(str, str + strlen(str), '\n') = '\0';
|
*std::remove(str, str + strlen(str), '\n') = '\0';
|
||||||
|
|
||||||
|
std::string log_string = str;
|
||||||
|
if (log_string.find("did not return a true") != std::string::npos)
|
||||||
|
return;;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
int len = 0;
|
int len = 0;
|
||||||
for(i = 0; *cur != '\0'; i++, cur++) {
|
for(i = 0; *cur != '\0'; i++, cur++) {
|
||||||
if(*cur == '\n') {
|
if(*cur == '\n') {
|
||||||
Log(Logs::General, Logs::Quests, str);
|
std::string string = StringFormat("%s - bitch", str);
|
||||||
|
Log(Logs::General, Logs::Quests, string.c_str());
|
||||||
len = 0;
|
len = 0;
|
||||||
pos = i+1;
|
pos = i+1;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user