Author: cazfi Date: Thu May 7 00:43:15 2015 New Revision: 29013 URL: http://svn.gna.org/viewcvs/freeciv?rev=29013&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_5/server/stdinhand.c Modified: branches/S2_5/server/stdinhand.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/stdinhand.c?rev=29013&r1=29012&r2=29013&view=diff ============================================================================== --- branches/S2_5/server/stdinhand.c (original) +++ branches/S2_5/server/stdinhand.c Thu May 7 00:43:15 2015 @@ -4990,7 +4990,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, @@ -5120,7 +5120,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