diff -Nur -Xsnap/diff_ignore snap/server/stdinhand.c snap-take/server/stdinhand.c --- snap/server/stdinhand.c 2003-07-13 23:27:06.000000000 -0500 +++ snap-take/server/stdinhand.c 2003-07-13 23:26:51.000000000 -0500 @@ -3162,6 +3162,12 @@ unattach_connection_from_player(pconn); + /* aitoggle the player if necessary */ + if (game.auto_ai_toggle && !old_plr->ai.control + && !old_plr->is_connected) { + toggle_ai_player_direct(NULL, old_plr); + } + /* need to reattach before we possibly remove the old player */ attach_connection_to_player(pconn, pplayer); @@ -3203,8 +3209,8 @@ /* if the player we're taking was already connected, then the primary * controller set that player to ai control. don't undo that decision */ - if (!was_connected && pplayer->ai.control) { - toggle_ai_player_direct(pconn, pplayer); + if (!was_connected && pplayer->ai.control && game.auto_ai_toggle) { + toggle_ai_player_direct(NULL, pplayer); } cmd_reply(CMD_TAKE, caller, C_OK, _("%s now controls %s"),