mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-20 17:31:30 +00:00
Update eqemu_server.pl [skip ci] - Fix eqemu_config.xml tag parsing scenarios
This commit is contained in:
parent
fe968f83a3
commit
97999a63b7
@ -1075,30 +1075,34 @@ sub read_eqemu_config_xml {
|
|||||||
if($o=~/database/i && $o=~/\<\//i){
|
if($o=~/database/i && $o=~/\<\//i){
|
||||||
$in_database_tag = 0;
|
$in_database_tag = 0;
|
||||||
}
|
}
|
||||||
if($o=~/\<database\>/i){
|
if($o=~/<database>/i){
|
||||||
print "IN DATABASE TAG\n" if $debug;
|
print "IN DATABASE TAG\n" if $debug;
|
||||||
$in_database_tag = 1;
|
$in_database_tag = 1;
|
||||||
}
|
}
|
||||||
if($o=~/\<longname\>/i){
|
if($o=~/<longname>/i){
|
||||||
($long_name) = $o =~ /<longname>(.*)<\/longname>/;
|
($long_name) = $o =~ /<longname>(.*)<\/longname>/;
|
||||||
print "Long Name: " . $long_name . "\n" if $debug;
|
print "Long Name: '" . $long_name . "'\n" if $debug;
|
||||||
}
|
}
|
||||||
if($in_database_tag == 1){
|
if($in_database_tag == 1){
|
||||||
if($o=~/\<username\>/i && $in_database_tag){
|
@left = split (">", $o);
|
||||||
($user) = $o =~ />(\w+)</;
|
@right = split("<", $left[1]);
|
||||||
print "Database User: " . $user . "\n" if $debug;
|
$tag_data = trim($right[0]);
|
||||||
|
|
||||||
|
if($o=~/<username>/i && $in_database_tag){
|
||||||
|
$user = $tag_data;
|
||||||
|
print "Database User: '" . $user . "'\n" if $debug;
|
||||||
}
|
}
|
||||||
if($o=~/\<password\>/i && $in_database_tag){
|
if($o=~/<password>/i && $in_database_tag){
|
||||||
($pass) = $o =~ />(\w+)</;
|
$pass = $tag_data;
|
||||||
print "Database Pass: " . $pass . "\n" if $debug;
|
print "Database Pass: '" . $pass . "'\n" if $debug;
|
||||||
}
|
}
|
||||||
if($o=~/\<db\>/i){
|
if($o=~/<db>/i){
|
||||||
($db) = $o =~ />(\w+)</;
|
$db = $tag_data;
|
||||||
print "Database Name: " . $db . "\n" if $debug;
|
print "Database Name: '" . $db . "'\n" if $debug;
|
||||||
}
|
}
|
||||||
if($o=~/\<host\>/i){
|
if($o=~/<host>/i){
|
||||||
($host) = $o =~ />(\w+)</;
|
$host = $tag_data;
|
||||||
print "Database Host: " . $host . "\n" if $debug;
|
print "Database Host: '" . $host . "'\n" if $debug;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user