Ah, well I debugged a bit. There is a check for "color level" in the protocol.c file (on line 2518) where it checks the preferences of the player.
New players have "no prefs" - defaulting to no color to show (their character struct is empty).
If we want them to have color by default, which we probably would if they support it, we must set the relevant preferences in interpreter.c:
Code:
diff --git a/src/interpreter.c b/src/interpreter.c
index 0dadad0..92eabc4 100644
--- a/src/interpreter.c
+++ b/src/interpreter.c
@@ -1409,7 +1409,13 @@ void nanny(struct descriptor_data *d, char *arg)
CREATE(d->character->player.name, char, strlen(tmp_name) + 1);
strcpy(d->character->player.name, CAP(tmp_name)); /* strcpy: OK (size checked above) */
GET_PFILEPOS(d->character) = player_i;
- write_to_output(d, "Did I get that right, %s (\t(Y\t)/\t(N\t))? ", tmp_name);
+
+ if (d->pProtocol && (d->pProtocol->pVariables[eMSDP_ANSI_COLORS] || d->pProtocol->pVariables[eMSDP_XTERM_256_COLORS])) {
+ SET_BIT_AR(PRF_FLAGS(d->character), PRF_COLOR_1);
+ SET_BIT_AR(PRF_FLAGS(d->character), PRF_COLOR_2);
+ }
+
+ write_to_output(d, "Did I get that right, %s (\t(Y\t)/\t(N\t))? ", tmp_name);
STATE(d) = CON_NAME_CNFRM;
} else {
/* undo it just in case they are set */
@@ -1433,6 +1439,11 @@ void nanny(struct descriptor_data *d, char *arg)
CREATE(d->character->player.name, char, strlen(tmp_name) + 1);
strcpy(d->character->player.name, CAP(tmp_name)); /* strcpy: OK (size checked above) */
+ if (d->pProtocol && (d->pProtocol->pVariables[eMSDP_ANSI_COLORS] || d->pProtocol->pVariables[eMSDP_XTERM_256_COLORS])) {
+ SET_BIT_AR(PRF_FLAGS(d->character), PRF_COLOR_1);
+ SET_BIT_AR(PRF_FLAGS(d->character), PRF_COLOR_2);
+ }
+
write_to_output(d, "Did I get that right, %s (\t(Y\t)/\t(N\t))? ", tmp_name);
STATE(d) = CON_NAME_CNFRM;
}