Author: cazfi
Date: Thu May  7 00:42:57 2015
New Revision: 29011

URL: http://svn.gna.org/viewcvs/freeciv?rev=29011&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:
    trunk/server/stdinhand.c

Modified: trunk/server/stdinhand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/stdinhand.c?rev=29011&r1=29010&r2=29011&view=diff
==============================================================================
--- trunk/server/stdinhand.c    (original)
+++ trunk/server/stdinhand.c    Thu May  7 00:42:57 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