Author: cazfi
Date: Thu May  7 00:43:06 2015
New Revision: 29012

URL: http://svn.gna.org/viewcvs/freeciv?rev=29012&view=rev
Log:
Fixed delegation handling to be completely case-insensitive in respect to 
usernames.

Reported by Davide Baldini <davide_at_debian>

See bug #21744

Modified:
    branches/S2_6/server/stdinhand.c

Modified: branches/S2_6/server/stdinhand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/stdinhand.c?rev=29012&r1=29011&r2=29012&view=diff
==============================================================================
--- branches/S2_6/server/stdinhand.c    (original)
+++ branches/S2_6/server/stdinhand.c    Thu May  7 00:43:06 2015
@@ -4963,7 +4963,7 @@
 
     /* Forbid delegation to player's original owner
      * (from above test we know that dplayer->username is the original now) */
-    if (strcmp(dplayer->username, username) == 0) {
+    if (fc_strcasecmp(dplayer->username, username) == 0) {
       if (player_specified) {
         /* Probably admin or console. */
         cmd_reply(CMD_DELEGATE, caller, C_FAIL,
@@ -5093,7 +5093,7 @@
     }
 
     if (!player_delegation_get(dplayer)
-        || strcmp(player_delegation_get(dplayer), caller->username) != 0) {
+        || fc_strcasecmp(player_delegation_get(dplayer), caller->username) != 
0) {
       cmd_reply(CMD_DELEGATE, caller, C_FAIL,
                 _("Control of player '%s' has not been delegated to you."),
                 player_name(dplayer));


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to