From 5edaccafa46f06c1fc3ed35021278f2ce4b1e5f0 Mon Sep 17 00:00:00 2001 From: Ron Koenderink Date: Thu, 11 Sep 2008 14:50:08 -0600 Subject: [PATCH] Change the thread name in play_cmd() to show country number This makes the journal easier to read. We can't use the country number earlier, because it is not unique then. --- src/lib/player/login.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/player/login.c b/src/lib/player/login.c index 947fdef7..3b0148a8 100644 --- a/src/lib/player/login.c +++ b/src/lib/player/login.c @@ -307,6 +307,7 @@ play_cmd(void) natid cnum; struct natstr *natp; char **ap; + char buf[128]; ap = player->argp; if (*++ap) { @@ -342,6 +343,8 @@ play_cmd(void) } return RET_FAIL; } + snprintf(buf, sizeof(buf), "Play#%d", player->cnum); + empth_set_name(buf); logerror("%s logged in as country #%d", praddr(player), player->cnum); pr_id(player, C_INIT, "%d\n", CLIENTPROTO); player_main(player);