From b44cf3ace9080914e29dda6bc2da3c56edeef1c5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 8 Dec 2014 23:36:09 +0000 Subject: [PATCH] fixed: carriage return in ${gameport} gameport variable was not being encoded in to an integer as it had a carriage return on the end. --- functions/fn_serverquery | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/fn_serverquery b/functions/fn_serverquery index e52f6590f..badd45400 100644 --- a/functions/fn_serverquery +++ b/functions/fn_serverquery @@ -2,13 +2,13 @@ # LGSM fn_serverquery function # Author: Daniel Gibbs # Website: http://danielgibbs.co.uk -# Version: 011214 +# Version: 081214 # uses gsquery.py to directly query the server # detects if the server locks up if [ -f gsquery.py ]; then if [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then - gameport=$(grep Port= "${systemdir}/${ini}"|grep -v Master|grep -v LAN|grep -v Proxy|grep -v Listen|sed 's/\Port=//g') + gameport=$(grep Port= "${systemdir}/${ini}"|grep -v Master|grep -v LAN|grep -v Proxy|grep -v Listen|sed 's/\Port=//g'|tr -d '\r') port=$((${gameport} + 1)) elif [ "${engine}" == "spark" ]; then port=$((${port} + 1))