I'd add it as a flag - to the do_toggle command.
Currently, echoing is turned on after login by the echo_on() call here:
github.com/tbamud/tbamud/blob/be8de64cf8...er.c#L1578C1-L1579C1
It should be reasonably easy to check if echoing should stay on, in for example the rmotd-state:
Code:
case CON_RMOTD: /* read CR after printing motd */
write_to_output(d, "%s", CONFIG_MENU);
if (IS_HAPPYHOUR > 0){
write_to_output(d, "\r\n");
write_to_output(d, "\tyThere is currently a Happyhour!\tn\r\n");
write_to_output(d, "\r\n");
}
if (PRF_FLAGGED(d->character, PRF_NO_ECHO)) {
write_to_output(d, "Turning off echo. Toggle it back on again with "toggle echo".\r\n");
echo_off();
}
add_llog_entry(d->character, LAST_CONNECT);
STATE(d) = CON_MENU;
break;
I'll leave adding the toggle to you