[Freeciv-Dev] (PR#9321) Bug: pubserver rankings are based on player name
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=9321 >
This patch simply replaces uses of the player name with the user name.
It should let rankings work as well as they do now, but with usernames.
However it looks to me like TEAMVICTORY and ALLIEDVICTORY need player
lists, so they won't work anyway.
-jason
Index: server/spacerace.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/spacerace.c,v
retrieving revision 1.37
diff -u -r1.37 spacerace.c
--- server/spacerace.c 29 Sep 2004 02:24:24 -0000 1.37
+++ server/spacerace.c 8 Dec 2004 00:55:22 -0000
@@ -370,6 +370,6 @@
gamelog(GAMELOG_NORMAL, _("The %s spaceship has arrived at "
"Alpha Centauri."),
get_nation_name(best_pplayer->nation));
- gamelog(GAMELOG_TEAM, "SINGLEWINNER %s", best_pplayer->name);
+ gamelog(GAMELOG_TEAM, "SINGLEWINNER %s", best_pplayer->username);
}
}
Index: server/srv_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/srv_main.c,v
retrieving revision 1.216
diff -u -r1.216 srv_main.c
--- server/srv_main.c 5 Dec 2004 08:50:46 -0000 1.216
+++ server/srv_main.c 8 Dec 2004 00:55:22 -0000
@@ -268,7 +268,7 @@
_("Game ended in victory for %s"), victor->name);
gamelog(GAMELOG_NORMAL, _("Game ended in victory for %s"),
victor->name);
- gamelog(GAMELOG_TEAM, "SINGLEWINNER %s", victor->name);
+ gamelog(GAMELOG_TEAM, "SINGLEWINNER %s", victor->username);
return TRUE;
} else if (alive == 0) {
notify_conn_ex(&game.est_connections, NULL, E_GAME_END,
@@ -661,7 +661,8 @@
} city_list_iterate_end;
gamelog(GAMELOG_NORMAL, "INFO %s cities %d, pop %d "
"food %d, prod %d, trade %d, settlers %d, units %d",
- pplayer->name, city_list_size(&pplayer->cities), workers, food,
+ pplayer->username, city_list_size(&pplayer->cities),
+ workers, food,
shields, trade, settlers, unit_list_size(&pplayer->units));
} players_iterate_end;
}
Index: server/unittools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unittools.c,v
retrieving revision 1.312
diff -u -r1.312 unittools.c
--- server/unittools.c 6 Dec 2004 18:01:15 -0000 1.312
+++ server/unittools.c 8 Dec 2004 00:55:23 -0000
@@ -1535,7 +1535,7 @@
notify_player(unit_owner(punit), _("Losing %s meant losing the game! "
"Be more careful next time!"), unit_name(punit->type));
gamelog(GAMELOG_NORMAL, _("Player %s lost a game loss unit and died"),
- unit_owner(punit)->name);
+ unit_owner(punit)->username);
unit_owner(punit)->is_dying = TRUE;
}
|
|