Replace empty server response with "Command processed"

Replaces the "Server received, But no response!!" return
from an RCON command with "Command processed".
This commit is contained in:
Ben Peddell 2016-02-18 06:23:58 +10:00
parent d9f08f637c
commit 653e934268

View File

@ -320,7 +320,11 @@ rconcmd() {
auth($socket, $password); auth($socket, $password);
sendpkt($socket, 2, 2, $command); sendpkt($socket, 2, 2, $command);
my ($resid, $restype, $rcvbody) = recvpkt($socket); my ($resid, $restype, $rcvbody) = recvpkt($socket);
print $rcvbody, "\n"; if ($rcvbody == "Server received, But no response!!") {
print "Command processed\n";
} else {
print $rcvbody, "\n";
}
' "$(getRconPort)" "${ark_MultiHome:-127.0.0.1}" "$adminpass" "$1" ' "$(getRconPort)" "${ark_MultiHome:-127.0.0.1}" "$adminpass" "$1"
} }
@ -342,7 +346,7 @@ doExitServer() {
# Broadcast message # Broadcast message
# #
doBroadcast(){ doBroadcast(){
rconcmd "broadcast $1" >/dev/null rconcmd "broadcast $1"
} }
# #