Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update network.php for better reading output in the gameserver console output #133

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion includes/classes/files.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function file_list($srvid,$dir,$tpl_browse=false)

// Read file
$fh = fopen($game_dir, "rb");
$file_content = fread($fh, 4096);
$file_content = fread($fh, filesize($game_dir));
fclose($fh);

// Return remote file content
Expand Down
4 changes: 2 additions & 2 deletions includes/classes/network.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ public function runcmd($srvid,$netarr,$cmd,$output=false,$gamesrv_id=false)
if($settings['debug']) echo "Running Command: $cmd <br />";

// Try exec
if(function_exists('exec')) return trim(exec($cmd));
elseif(function_exists('shell_exec')) return trim(shell_exec($cmd));
if(function_exists('shell_exec')) return trim(shell_exec($cmd));
elseif(function_exists('exec')) return trim(exec($cmd));
elseif(function_exists('system')) return trim(system($cmd));
else return 'RunCMD: The "exec" function is not available! You must enable exec() in your php.ini file or choose the "Remote Server" option.';
}
Expand Down