Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2000:
[Freeciv-Dev] patch: minor fixes to "firstlevel"
Home

[Freeciv-Dev] patch: minor fixes to "firstlevel"

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] patch: minor fixes to "firstlevel"
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Thu, 31 Aug 2000 18:09:15 +1100 (EST)

This patch makes some minor fixes to recently added code:  Remove 
unnecessary gettext marking and newline for "firstlevel" synopsis,
and tidy up comments.  Comment and simplify a_connection_exists().

-- David
--- freeciv-cvs/server/stdinhand.c      Thu Aug 31 17:58:21 2000
+++ fc-adv/server/stdinhand.c   Thu Aug 31 18:01:15 2000
@@ -1011,9 +1011,9 @@
       "Note that this command now takes connection names, not player names."
       )
   },
-  {"firstlevel", ALLOW_INFO,  /* ! */
-   /* translate <> only */
-   N_("firstlevel\n"),
+  {"firstlevel", ALLOW_INFO,  /* Not really "informational", but needs to
+                                be ALLOW_INFO to be useful. */
+   "firstlevel",
    N_("Grab the 'first come' command access level."),
    N_("If 'cmdlevel first come' has been used to set a special 'first come'\n"
       "command access level, this is the command to grab it with."
@@ -1868,15 +1868,11 @@
 }
 
 /********************************************************************
-...
+  Returns true if there is at least one established connection.
 *********************************************************************/
 static int a_connection_exists(void)
 {
-  conn_list_iterate(game.est_connections, pconn) {
-    return 1;
-  }
-  conn_list_iterate_end;
-  return 0;
+  return BOOL_VAL(conn_list_size(&game.est_connections));
 }
 
 /********************************************************************

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] patch: minor fixes to "firstlevel", David Pfitzner <=