… | |
… | |
1301 | * cleanup. We also leave that loop to actually handle the freeing |
1301 | * cleanup. We also leave that loop to actually handle the freeing |
1302 | * of the data. |
1302 | * of the data. |
1303 | */ |
1303 | */ |
1304 | if (pl->ob->type != DEAD_OBJECT) |
1304 | if (pl->ob->type != DEAD_OBJECT) |
1305 | { |
1305 | { |
1306 | pl->socket.status = Ns_Dead; |
1306 | pl->socket->status = Ns_Dead; |
1307 | |
1307 | |
1308 | /* If a hidden dm dropped connection do not create |
1308 | /* If a hidden dm dropped connection do not create |
1309 | * inconsistencies by showing that they have left the game |
1309 | * inconsistencies by showing that they have left the game |
1310 | */ |
1310 | */ |
1311 | if (!(QUERY_FLAG (pl->ob, FLAG_WIZ) && pl->ob->contr->hidden) |
1311 | if (!(QUERY_FLAG (pl->ob, FLAG_WIZ) && pl->ob->contr->hidden) |
1312 | && draw_exit && (pl->state != ST_GET_NAME && pl->state != ST_GET_PASSWORD && pl->state != ST_CONFIRM_PASSWORD)) |
1312 | && draw_exit && (pl->state != ST_GET_NAME && pl->state != ST_GET_PASSWORD && pl->state != ST_CONFIRM_PASSWORD)) |
1313 | { |
1313 | { |
1314 | if (pl->ob->map) |
1314 | if (pl->ob->map) |
1315 | { |
1315 | { |
1316 | INVOKE_PLAYER (LOGOUT, pl); |
1316 | INVOKE_PLAYER (LOGOUT, pl); |
1317 | LOG (llevInfo, "LOGOUT: Player named %s from ip %s\n", &pl->ob->name, pl->socket.host); |
1317 | LOG (llevInfo, "LOGOUT: Player named %s from ip %s\n", &pl->ob->name, pl->socket->host); |
1318 | } |
1318 | } |
1319 | |
1319 | |
1320 | char buf[MAX_BUF]; |
1320 | char buf[MAX_BUF]; |
1321 | |
1321 | |
1322 | sprintf (buf, "%s left the game.", &pl->ob->name); |
1322 | sprintf (buf, "%s left the game.", &pl->ob->name); |