ansi color in connect.txt

Submitted by javelin on Mon, 2012-02-13 19:52

Note: Since after 1.8.3 or so, ANSI and ACCENTS were enabled by default. The suggested method is now to use a message object instead of straight textfiles. That allows you to simply use [ansi()] softcode etc.

// Considerations //
1) This worked on 181p9 - I don't know if it will work on older versions
2) If someone connects to your mush with a client which can't grok ansi codes, your connect.txt will look like regurgitated potato salad.
// HOW TO //
1) in pennmush/src note notify.c around line 690:

  if (!d->connected) {
    /* These are the settings used at, e.g., the connect screen,
     * when there's no connected player yet. If you want to use
     * ansified connect screens, you'd probably change NA_NPASCII
     * to NA_NCOLOR (for no accents) or NA_COLOR (for accents).
     * We don't recommend it. If you want to use accented characters,
     * change NA_NPUEBLO and NA_NPASCII to NA_PUEBLO and NA_PASCII,
     * respectively. That's not so bad.
     */
    return (d->conn_flags & CONN_HTML) ? NA_NPUEBLO : NA_NPASCII;

2) Not so bad, huh?

2006-Jul-28 2:40pm bill