mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 04:11:30 +00:00
Update eqemu_server.pl [skip ci]
This commit is contained in:
parent
a6638104ac
commit
f6ea89f100
@ -253,8 +253,8 @@ sub new_server {
|
||||
while (<MYSQL_CHECK>) {
|
||||
chomp;
|
||||
$o = $_;
|
||||
if ($o =~ /Error/i) {$mysql_pass = 0;}
|
||||
if ($o =~ /SHOW PROCESSLIST/i) {$mysql_pass = 1;}
|
||||
if ($o =~ /Error/i) { $mysql_pass = 0; }
|
||||
if ($o =~ /SHOW PROCESSLIST/i) { $mysql_pass = 1; }
|
||||
}
|
||||
close(MYSQL_CHECK);
|
||||
unlink("mysqlcheck.txt");
|
||||
@ -467,8 +467,8 @@ sub do_installer_routines {
|
||||
print `"$path" --host $host --user $user --password="$pass" -N -B -e "CREATE DATABASE $db_name"`;
|
||||
|
||||
#::: Get Binary DB version
|
||||
if ($OS eq "Windows") {@db_version = split(': ', `world db_version`);}
|
||||
if ($OS eq "Linux") {@db_version = split(': ', `./world db_version`);}
|
||||
if ($OS eq "Windows") { @db_version = split(': ', `world db_version`); }
|
||||
if ($OS eq "Linux") { @db_version = split(': ', `./world db_version`); }
|
||||
$binary_database_version = trim($db_version[1]);
|
||||
|
||||
#::: Local DB Version
|
||||
@ -556,7 +556,7 @@ sub check_for_world_bootup_database_update {
|
||||
|
||||
#::: Make sure that we didn't pass any arugments to the script
|
||||
else {
|
||||
if (!$db) {print "[eqemu_server.pl] No database connection found... Running without\n";}
|
||||
if (!$db) { print "[eqemu_server.pl] No database connection found... Running without\n"; }
|
||||
show_menu_prompt();
|
||||
}
|
||||
}
|
||||
@ -624,7 +624,7 @@ sub do_self_update_check_routine {
|
||||
my @files;
|
||||
my $start_dir = "updates_staged/";
|
||||
find(
|
||||
sub {push @files, $File::Find::name unless -d;},
|
||||
sub { push @files, $File::Find::name unless -d; },
|
||||
$start_dir
|
||||
);
|
||||
for my $file (@files) {
|
||||
@ -1015,7 +1015,7 @@ sub check_for_database_dump_script {
|
||||
my @files;
|
||||
my $start_dir = "updates_staged/";
|
||||
find(
|
||||
sub {push @files, $File::Find::name unless -d;},
|
||||
sub { push @files, $File::Find::name unless -d; },
|
||||
$start_dir
|
||||
);
|
||||
for my $file (@files) {
|
||||
@ -1098,8 +1098,8 @@ sub check_db_version_table {
|
||||
#::: Returns Tab Delimited MySQL Result from Command Line
|
||||
sub get_mysql_result {
|
||||
my $run_query = $_[0];
|
||||
if (!$db) {return;}
|
||||
if ($OS eq "Windows") {return `"$path" --host $host --user $user --password="$pass" $db -N -B -e "$run_query"`;}
|
||||
if (!$db) { return; }
|
||||
if ($OS eq "Windows") { return `"$path" --host $host --user $user --password="$pass" $db -N -B -e "$run_query"`; }
|
||||
if ($OS eq "Linux") {
|
||||
$run_query =~ s/`//g;
|
||||
return `$path --user="$user" --host $host --password="$pass" $db -N -B -e "$run_query"`;
|
||||
@ -1108,9 +1108,17 @@ sub get_mysql_result {
|
||||
|
||||
sub get_mysql_result_from_file {
|
||||
my $update_file = $_[0];
|
||||
if (!$db) {return;}
|
||||
if ($OS eq "Windows") {return `"$path" --host $host --user $user --password="$pass" --force $db < $update_file`;}
|
||||
if ($OS eq "Linux") {return `"$path" --host $host --user $user --password="$pass" --force $db < $update_file`;}
|
||||
if (!$db) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($OS eq "Windows") {
|
||||
return `"$path" --host $host --user $user --password="$pass" --force $db < $update_file`;
|
||||
}
|
||||
|
||||
if ($OS eq "Linux") {
|
||||
return `"$path" --host $host --user $user --password="$pass" --force $db < $update_file`;
|
||||
}
|
||||
}
|
||||
|
||||
#::: Gets Remote File based on request_url (1st Arg), and saves to destination file (2nd Arg)
|
||||
@ -1341,7 +1349,7 @@ sub fetch_latest_windows_appveyor {
|
||||
my @files;
|
||||
my $start_dir = "updates_staged/binaries";
|
||||
find(
|
||||
sub {push @files, $File::Find::name unless -d;},
|
||||
sub { push @files, $File::Find::name unless -d; },
|
||||
$start_dir
|
||||
);
|
||||
for my $file (@files) {
|
||||
@ -1364,7 +1372,7 @@ sub fetch_latest_windows_binaries {
|
||||
my @files;
|
||||
my $start_dir = "updates_staged/binaries";
|
||||
find(
|
||||
sub {push @files, $File::Find::name unless -d;},
|
||||
sub { push @files, $File::Find::name unless -d; },
|
||||
$start_dir
|
||||
);
|
||||
for my $file (@files) {
|
||||
@ -1387,7 +1395,7 @@ sub fetch_latest_windows_binaries_bots {
|
||||
my @files;
|
||||
my $start_dir = "updates_staged/binaries";
|
||||
find(
|
||||
sub {push @files, $File::Find::name unless -d;},
|
||||
sub { push @files, $File::Find::name unless -d; },
|
||||
$start_dir
|
||||
);
|
||||
for my $file (@files) {
|
||||
@ -1409,7 +1417,7 @@ sub do_windows_login_server_setup {
|
||||
my @files;
|
||||
my $start_dir = "updates_staged/login_server";
|
||||
find(
|
||||
sub {push @files, $File::Find::name unless -d;},
|
||||
sub { push @files, $File::Find::name unless -d; },
|
||||
$start_dir
|
||||
);
|
||||
for my $file (@files) {
|
||||
@ -1478,9 +1486,9 @@ sub do_linux_login_server_setup {
|
||||
chomp;
|
||||
$o = $_;
|
||||
#::: Find replace variables
|
||||
if ($o =~ /db/i) {$o = "db = " . $db_name;}
|
||||
if ($o =~ /user/i) {$o = "user = " . $db_user;}
|
||||
if ($o =~ /password/i) {$o = "password = " . $db_password;}
|
||||
if ($o =~ /db/i) { $o = "db = " . $db_name; }
|
||||
if ($o =~ /user/i) { $o = "user = " . $db_user; }
|
||||
if ($o =~ /password/i) { $o = "password = " . $db_password; }
|
||||
|
||||
print NEW_CONFIG $o . "\n";
|
||||
}
|
||||
@ -1598,7 +1606,7 @@ sub fetch_peq_db_full {
|
||||
unzip('updates_staged/peq_beta.zip', 'updates_staged/peq_db/');
|
||||
my $start_dir = "updates_staged/peq_db";
|
||||
find(
|
||||
sub {push @files, $File::Find::name unless -d;},
|
||||
sub { push @files, $File::Find::name unless -d; },
|
||||
$start_dir
|
||||
);
|
||||
for my $file (@files) {
|
||||
@ -1622,7 +1630,7 @@ sub map_files_fetch_bulk {
|
||||
my @files;
|
||||
my $start_dir = "maps/EQEmuMaps-master/";
|
||||
find(
|
||||
sub {push @files, $File::Find::name unless -d;},
|
||||
sub { push @files, $File::Find::name unless -d; },
|
||||
$start_dir
|
||||
);
|
||||
for my $file (@files) {
|
||||
@ -1688,7 +1696,7 @@ sub quest_files_fetch {
|
||||
my @files;
|
||||
my $start_dir = "updates_staged/projecteqquests-master/";
|
||||
find(
|
||||
sub {push @files, $File::Find::name unless -d;},
|
||||
sub { push @files, $File::Find::name unless -d; },
|
||||
$start_dir
|
||||
);
|
||||
for my $file (@files) {
|
||||
@ -1748,7 +1756,7 @@ sub lua_modules_fetch {
|
||||
my @files;
|
||||
my $start_dir = "updates_staged/projecteqquests-master/lua_modules/";
|
||||
find(
|
||||
sub {push @files, $File::Find::name unless -d;},
|
||||
sub { push @files, $File::Find::name unless -d; },
|
||||
$start_dir
|
||||
);
|
||||
for my $file (@files) {
|
||||
@ -1807,7 +1815,7 @@ sub plugins_fetch {
|
||||
my @files;
|
||||
my $start_dir = "updates_staged/projecteqquests-master/plugins/";
|
||||
find(
|
||||
sub {push @files, $File::Find::name unless -d;},
|
||||
sub { push @files, $File::Find::name unless -d; },
|
||||
$start_dir
|
||||
);
|
||||
for my $file (@files) {
|
||||
@ -2332,7 +2340,7 @@ sub fetch_missing_db_update {
|
||||
}
|
||||
|
||||
sub print_match_debug {
|
||||
if (!$debug) {return;}
|
||||
if (!$debug) { return; }
|
||||
print " Match Type: '" . $match_type . "'\n";
|
||||
print " Match Text: '" . $match_text . "'\n";
|
||||
print " Query Check: '" . $query_check . "'\n";
|
||||
@ -2340,7 +2348,7 @@ sub print_match_debug {
|
||||
}
|
||||
|
||||
sub print_break {
|
||||
if (!$debug) {return;}
|
||||
if (!$debug) { return; }
|
||||
print "\n==============================================\n";
|
||||
}
|
||||
|
||||
@ -2378,13 +2386,13 @@ sub quest_heading_convert {
|
||||
my @files;
|
||||
my $start_dir = "quests/.";
|
||||
find(
|
||||
sub {push @files, $File::Find::name unless -d;},
|
||||
sub { push @files, $File::Find::name unless -d; },
|
||||
$start_dir
|
||||
);
|
||||
for my $file (@files) {
|
||||
|
||||
#::: Skip non script files
|
||||
if ($file !~ /lua|pl/i) {next;}
|
||||
if ($file !~ /lua|pl/i) { next; }
|
||||
|
||||
if ($file =~ /lua|pl/i) {
|
||||
$print_buffer = "";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user