mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-04 06:16:38 +00:00
svn -> git Migration
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<?
|
||||
$offset = $request->get("offset", "0");
|
||||
my @bugs = $EQW->ListBugs($offset);
|
||||
my $bug_count = @bugs;
|
||||
my $total_bug_count = $EQW->CountBugs();
|
||||
print "{";
|
||||
print "\"total_bug_count\" : $total_bug_count,";
|
||||
print "\"bug_count\" : $bug_count,";
|
||||
print "\"bugs\" : ";
|
||||
print "[";
|
||||
my $i = 0;
|
||||
for my $bugkey (@bugs) {
|
||||
my $bug = $EQW->GetBugDetails($bugkey);
|
||||
|
||||
my $bug_val = $bug->{bug};
|
||||
$bug_val =~ s/\\/\\\\/g;
|
||||
$bug_val =~ s/\//\\\//g;
|
||||
$bug_val =~ s/\"/\\\"/g;
|
||||
$bug_val =~ s/\n/<br>/g;
|
||||
$bug_val =~ s/\r/\\r/g;
|
||||
$bug_val =~ s/\t/\\t/g;
|
||||
$bug_val =~ s/\x08/\\f/g;
|
||||
$bug_val =~ s/\x0C/\\b/g;
|
||||
$bug_val =~ s/[\x00-\x1F]/\./g;
|
||||
$bug_val =~ s/[\x7F-\xFF]/\./g;
|
||||
print "{";
|
||||
print "\"id\" : \"$bug->{id}\",";
|
||||
print "\"name\" : \"$bug->{name}\",";
|
||||
print "\"zone\" : \"$bug->{zone}\",";
|
||||
print "\"target\" : \"$bug->{target}\",";
|
||||
print "\"bug\" : \"$bug_val\",";
|
||||
print "\"x\" : \"$bug->{x}\",";
|
||||
print "\"y\" : \"$bug->{y}\",";
|
||||
print "\"z\" : \"$bug->{z}\"";
|
||||
|
||||
print "}";
|
||||
if($i != $bug_count - 1) {
|
||||
print ",";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
print "]";
|
||||
print "}";
|
||||
?>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?
|
||||
my $message_count = $EQW->CountConsoleMessages();
|
||||
print "{";
|
||||
print "\"message_count\" : $message_count,";
|
||||
print "\"messages\" : ";
|
||||
print "[";
|
||||
for(my $i = 0; $i < $message_count; $i++)
|
||||
{
|
||||
print "{";
|
||||
my $msg = $EQW->GetConsoleMessage($i);
|
||||
$message = $msg->{message};
|
||||
$message =~ s/\\/\\\\/g;
|
||||
$message =~ s/\//\\\//g;
|
||||
$message =~ s/\"/\\\"/g;
|
||||
$message =~ s/\n/\\n/g;
|
||||
$message =~ s/\r/\\r/g;
|
||||
$message =~ s/\t/\\t/g;
|
||||
$message =~ s/\x08/\\f/g;
|
||||
$message =~ s/\x0C/\\b/g;
|
||||
$message =~ s/[\x00-\x1F]/\./g;
|
||||
$message =~ s/[\x7F-\xFF]/\./g;
|
||||
|
||||
print "\"message\" : \"$message\"";
|
||||
print "}";
|
||||
if($i != $message_count - 1) {
|
||||
print ",";
|
||||
}
|
||||
}
|
||||
print "]";
|
||||
print "}";
|
||||
?>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?
|
||||
my $launcher_count = $EQW->CountLaunchers(1);
|
||||
print "{";
|
||||
print "\"launcher_count\" : " . $launcher_count;
|
||||
print "}";
|
||||
?>
|
||||
@@ -0,0 +1,69 @@
|
||||
<?
|
||||
$launcher_name = $request->get("launcher", "none");
|
||||
|
||||
if($launcher_name eq "none") {
|
||||
@launchers = sort $EQW->ListLaunchers();
|
||||
my $launcher_count = @launchers;
|
||||
print "{";
|
||||
print "\"launcher_count\" : $launcher_count,";
|
||||
print "\"launchers\" : ";
|
||||
print "[";
|
||||
|
||||
my $i = 0;
|
||||
for my $lk (@launchers) {
|
||||
my $l = $EQW->GetLauncher($lk);
|
||||
print "{";
|
||||
print "\"name\" : \"". $l->GetName() ."\",";
|
||||
print "\"static_count\" : ". $l->GetStaticCount() .",";
|
||||
print "\"dynamic_count\" : ". $l->GetDynamicCount() .",";
|
||||
$conn = 0;
|
||||
if($l->IsConnected()) {
|
||||
$conn = 1;
|
||||
}
|
||||
print "\"connected\" : ". $conn;
|
||||
print "}";
|
||||
|
||||
if($i != $launcher_count - 1) {
|
||||
print ",";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
print "]";
|
||||
print "}";
|
||||
} else {
|
||||
my $l = $EQW->GetLauncher($lname);
|
||||
print "{";
|
||||
print "\"name\" : \"". $l->GetName() ."\",";
|
||||
print "\"static_count\" : ". $l->GetStaticCount() .",";
|
||||
print "\"dynamic_count\" : ". $l->GetDynamicCount() .",";
|
||||
$conn = 0;
|
||||
if($l->IsConnected()) {
|
||||
$conn = 1;
|
||||
}
|
||||
print "\"connected\" : ". $conn . ",";
|
||||
my @zones = $l->ListZones();
|
||||
my $zone_count = @zones;
|
||||
print "\"zone_count\" : ". $zone_count . ",";
|
||||
print "\"zones\" : ";
|
||||
print "[";
|
||||
my $i = 0;
|
||||
for my $zone (@zones) {
|
||||
my $z = $config->GetZoneDetails($zone);
|
||||
print "{";
|
||||
print "\"name\" : \"$z->{name}\",";
|
||||
print "\"up\" : $z->{up},";
|
||||
print "\"starts\" : $z->{starts},";
|
||||
print "\"port\" : $z->{port}";
|
||||
print "}";
|
||||
|
||||
if($i != $zone_count - 1) {
|
||||
print ", ";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
print "]";
|
||||
print "}";
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?
|
||||
my $player_count = $EQW->CountPlayers();
|
||||
print "{";
|
||||
print "\"player_count\" : " . $player_count;
|
||||
print "}";
|
||||
?>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?
|
||||
$zone = $request->get("zone", "");
|
||||
$instance_id = $request->get("instance_id", "0");
|
||||
my @players = $EQW->ListPlayers($zone, $instance_id);
|
||||
my $player_count = @players;
|
||||
print "{";
|
||||
print "\"player_count\" : $player_count,";
|
||||
print "\"players\" : ";
|
||||
print "[";
|
||||
|
||||
my $i = 0;
|
||||
for my $player (@players) {
|
||||
my $pd = $EQW->GetPlayerDetails($player);
|
||||
|
||||
print "{";
|
||||
print "\"character\" : \"$pd->{character}\",";
|
||||
print "\"account\" : \"$pd->{account}\",";
|
||||
print "\"account_id\" : \"$pd->{account_id}\",";
|
||||
print "\"location_short\" : \"$pd->{location_short}\",";
|
||||
print "\"location_long\" : \"$pd->{location_long}\",";
|
||||
print "\"ip\" : \"$pd->{ip}\",";
|
||||
print "\"level\" : \"$pd->{level}\",";
|
||||
print "\"race\" : \"$pd->{race}\",";
|
||||
print "\"race_id\" : \"$pd->{race_id}\",";
|
||||
print "\"class\" : \"$pd->{class}\",";
|
||||
print "\"class_id\" : \"$pd->{class_id}\",";
|
||||
print "\"guild_id\" : \"$pd->{guild_id}\",";
|
||||
print "\"guild\" : \"$pd->{guild}\",";
|
||||
print "\"status\" : \"$pd->{status}\",";
|
||||
print "\"client_version\" : \"$pd->{client_version}\"";
|
||||
print "}";
|
||||
|
||||
if($i != $player_count - 1) {
|
||||
print ",";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
print "]";
|
||||
print "}";
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?
|
||||
print "{";
|
||||
if($EQW->LSConnected()) {
|
||||
print "\"connected\" : \"1\",";
|
||||
} else {
|
||||
print "\"connected\" : \"0\",";
|
||||
}
|
||||
if($EQW->GetConfig("Locked") eq "true") {
|
||||
print "\"locked\" : \"1\"";
|
||||
} else {
|
||||
print "\"locked\" : \"0\"";
|
||||
}
|
||||
print "}";
|
||||
?>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?
|
||||
my $zone_count = $EQW->CountZones();
|
||||
print "{";
|
||||
print "\"zone_count\" : " . $zone_count;
|
||||
print "}";
|
||||
?>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?
|
||||
|
||||
@zones = $EQW->ListBootedZones();
|
||||
@zones = sort @zones;
|
||||
$zone_count = @zones;
|
||||
|
||||
print "{";
|
||||
print "\"zone_count\" : $zone_count,";
|
||||
print "\"zones\" : ";
|
||||
print "[";
|
||||
|
||||
for(my $i = 0; $i < $zone_count; $i++) {
|
||||
my $zone = $EQW->GetZoneDetails($zones[$i]);
|
||||
print "{";
|
||||
print "\"type\" : \"$zone->{type}\",";
|
||||
print "\"zone_id\" : $zone->{zone_id},";
|
||||
print "\"launch_name\" : \"$zone->{launch_name}\",";
|
||||
print "\"short_name\" : \"$zone->{short_name}\",";
|
||||
print "\"long_name\" : \"$zone->{long_name}\",";
|
||||
print "\"port\" : $zone->{port},";
|
||||
print "\"player_count\" : $zone->{player_count},";
|
||||
print "\"instance_id\" : $zone->{instance_id}";
|
||||
print "}";
|
||||
|
||||
if($i != $zone_count - 1) {
|
||||
print ",";
|
||||
}
|
||||
}
|
||||
|
||||
print "]";
|
||||
print "}";
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user