--- cityhand.c.org Fri Sep 22 12:40:48 2000 +++ cityhand.c Sat Sep 23 21:27:50 2000 @@ -23,6 +23,7 @@ #include "city.h" #include "events.h" #include "fcintl.h" +#include "game.h" #include "idex.h" #include "log.h" #include "map.h" @@ -666,11 +667,16 @@ pcity=find_city_by_id(preq->city_id); - if(!player_owns_city(pplayer, pcity)) + if(!player_owns_city(pplayer, pcity)) { + notify_player(pplayer, _("Game: you can't rename cities you don't own!")); return; - + } + if((cp=get_sane_name(preq->name))) { - /* more sanity tests! any existing city with that name? */ + if (game_find_city_by_name(cp)) { + notify_player(pplayer, _("Game: the name '%s' is already taken.")); + return; + } sz_strlcpy(pcity->name, cp); city_refresh(pcity); send_city_info(0, pcity);