mail[Wesnoth-commits] r24793 - in /trunk/utils/mp-server: send_server_command send_server_message


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by soliton . de on March 19, 2008 - 03:55:
Author: soliton
Date: Wed Mar 19 03:55:08 2008
New Revision: 24793

URL: http://svn.gna.org/viewcvs/wesnoth?rev=24793&view=rev
Log:
* give an error message when a non-existing server is used

Modified:
    trunk/utils/mp-server/send_server_command
    trunk/utils/mp-server/send_server_message

Modified: trunk/utils/mp-server/send_server_command
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/mp-server/send_server_command?rev=24793&r1=24792&r2=24793&view=diff
==============================================================================
--- trunk/utils/mp-server/send_server_command (original)
+++ trunk/utils/mp-server/send_server_command Wed Mar 19 03:55:08 2008
@@ -7,7 +7,10 @@
 SERVER=$1
 SERVERBASE=$HOME/servers/$SERVER
 SOCKET=$SERVERBASE/build/var/run/socket
-
+if ! [ -d "$SERVERBASE" ]; then
+       echo "Server '$SERVER' not found."
+       exit 1
+fi
 if ! [ -e $SOCKET ]; then
        echo "$SOCKET not found, using the 'oldbuild'."
        SOCKET=$SERVERBASE/oldbuild/var/run/socket

Modified: trunk/utils/mp-server/send_server_message
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/mp-server/send_server_message?rev=24793&r1=24792&r2=24793&view=diff
==============================================================================
--- trunk/utils/mp-server/send_server_message (original)
+++ trunk/utils/mp-server/send_server_message Wed Mar 19 03:55:08 2008
@@ -7,7 +7,10 @@
 SERVER=$1
 SERVERBASE=$HOME/servers/$SERVER
 SOCKET=$SERVERBASE/build/var/run/socket
-
+if ! [ -d "$SERVERBASE" ]; then
+       echo "Server '$SERVER' not found."
+       exit 1
+fi
 shift
 if [ "$*" == "" ]; then
        message="The server will get restarted now. Please don't forget to 
save your game!"




Related Messages


Powered by MHonArc, Updated Wed Mar 19 06:20:57 2008