Marko pointed out some possible errors in my newcomer code. I'm trying
to see how to reliably (possibly) remove and old (dead) player, and add
a new one. I found this comment before server_remove_player:

./plrhand.c:1135:   This function does _not_ close any connections attached to 
this
./plrhand.c:1136:   player. The function cut_connection() is used for that. Be 
sure
./plrhand.c:1137:   to send_player_slot_info_c() afterwards to tell clients 
that the
./plrhand.c:1138:   player slot has become unused.

Apparently there is no cut_connection() function:
[13:56:ttypg][longturn@spock:~/src/freeciv-2.3:7]$ grep -r cut_connection .
./server/.svn/text-base/plrhand.c.svn-base:  player. The function 
cut_connection() is used for that. Be sure
./server/plrhand.c:  player. The function cut_connection() is used for that. Be 
sure

Please advise, how do i gracefully possibly remove a non-ai player and
add a new one, in a running game?

Also, due to idlers in longturn I want to write a command to switch a
player. Is just changing the player name sufficient? How about changing
the nation of a player, in a running game?

The reason for my commenting out the initialization code is that the
api changed since 2.2. Thank you Marko for pointing it out!

-- 
Michal Mazurek

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

Reply via email to