<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40475 >

Numerous users and server operators have complained in
the forums about the awkward command level/voting
behaviour in 2.1:
http://forum.freeciv.org/viewtopic.php?t=5566
http://forum.freeciv.org/viewtopic.php?t=5539

My own experience with warserver has also been that
the "firstlevel" access granting scheme along with
the expectation that someone reliable will step up
and be the "game organizer" is ill thought out and
not practical for online multiplayer games, where
unexpected disconnections and abuse are rather
common.

Attached patch does away with firstlevel by making
its default ALLOW_INFO. It also changes the vote system
to allow voting during pregame; player connections
with command level info start a vote if they issue
a ctrl level command.


-----------------------------------------------------------------------
この多い脱線は神経に障るぞ。
diff --git a/server/stdinhand.c b/server/stdinhand.c
index 9ff2b03..ec7378c 100644
--- a/server/stdinhand.c
+++ b/server/stdinhand.c
@@ -76,7 +76,7 @@
 #define TOKEN_DELIMITERS " \t\n,"
 
 static enum cmdlevel_id default_access_level = ALLOW_INFO;
-static enum cmdlevel_id   first_access_level = ALLOW_CTRL;
+static enum cmdlevel_id   first_access_level = ALLOW_INFO;
 
 static bool cut_client_connection(struct connection *caller, char *name,
                                   bool check);
@@ -2160,10 +2160,11 @@ static bool vote_command(struct connection *caller, char *str,
   } else if (caller->observer) {
     cmd_reply(CMD_VOTE, caller, C_FAIL, _("Observers cannot vote."));
     return FALSE;
-  } else if (S_S_RUNNING != server_state()) {
-    cmd_reply(CMD_VOTE, caller, C_FAIL, _("You can only vote in a "
-              "running game.  Use 'first' to become the game organizer "
-              "if there currently is none."));
+  } else if (!(S_S_INITIAL == server_state()
+               || S_S_RUNNING == server_state())) {
+    cmd_reply(CMD_VOTE, caller, C_FAIL,
+              _("You may only vote during pregame or while the game "
+                "is running."));
     return FALSE;
   } else if (!str || strlen(str) == 0) {
     int j = 0;
@@ -3550,7 +3551,8 @@ bool handle_stdin_input(struct connection *caller, char *str, bool check)
     return FALSE;
   }
 
-  if (S_S_INITIAL != server_state()
+  if ((S_S_INITIAL == server_state()
+       || S_S_RUNNING == server_state())
       && caller
       && caller->player
       && !caller->observer /* don't allow observers to ask votes */
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to