Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2004:
[Freeciv-Dev] (PR#10472) Re: Observers shouldn't be allowed to vote
Home

[Freeciv-Dev] (PR#10472) Re: Observers shouldn't be allowed to vote

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: kaufman@xxxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#10472) Re: Observers shouldn't be allowed to vote
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Sat, 9 Oct 2004 14:23:15 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=10472 >

[kauf - Thu Oct 07 23:03:15 2004]:
> users connected to players as observers shouldn't be allowed to vote.

Yep. Patch.

  - Per
Index: server/stdinhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/stdinhand.c,v
retrieving revision 1.354.2.2
diff -u -r1.354.2.2 stdinhand.c
--- server/stdinhand.c  7 Oct 2004 03:55:44 -0000       1.354.2.2
+++ server/stdinhand.c  9 Oct 2004 21:22:45 -0000
@@ -2066,6 +2066,9 @@
   if (caller == NULL || caller->player == NULL) {
     cmd_reply(CMD_VOTE, caller, C_FAIL, _("This command is client only."));
     return FALSE;
+  } else if (caller->player->is_observer) {
+    cmd_reply(CMD_VOTE, caller, C_FAIL, _("Observers cannot vote."));
+    return FALSE;
   } else if (!str || strlen(str) == 0) {
     int j = 0;
 

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#10472) Re: Observers shouldn't be allowed to vote, Per I. Mathisen <=