Alright.  I download the colour limiting snippet from kyndig.  I installed
it and everything went smoothly. Here is the code and instructions below:
----------------------------------------------------------------------------
----------------------------------------
in MERC.H add this
void strip_mortal_color(char *bufin, bool GLOBAL);


in all your channels ACT_COMM.C in like DO_GOSSIP and DO_SAY add this
        if(!IS_IMMORTAL(ch))
                strip_mortal_color( argument, TRUE );

before the output of sprintf(buf, "You gossip '%s'", argument); or similar
expresion used to send the entire argument (what was said) to whomever it
was going to.

for say i use FALSE and allow some codes not allowed for global channels.



in ACT_INFO.C under do_title add
        /* not even imms can use these here */
        strip_mortal_color( argument, TRUE );
before these lines of code
    smash_tilde (argument);
    set_title (ch, argument);




Last add this routine somewhere in a .c file i put it in ACT_NEWC.C
/*
 * Strip reserved immortal only colors from strings
 * These are based on my color codes yours may very some.
 *
 * Last the GLOBAL flag is used only when this affects everyone
 * mud wide like gossip. For say i make this false and allow
 * clear screen to be used by mortals.
 */

void strip_mortal_color(char *bufin, bool GLOBAL)
{
        const char *pointer;

        for(pointer = bufin; *pointer; pointer++)
        {
                if(*pointer == '{') /*this "{" is infact the color pointer on 
my mud*/
                {
                        pointer++;
                        bufin++;
                        if(*pointer == 'z') /*blinking text reserved*/
                        {
                                *bufin = ' ';
                        }

                        if(*pointer == '`') /*line space reserved*/
                        {
                                *bufin = ' ';
                        }

                        if(*pointer == '0' && GLOBAL) /*used for clear screen 
reserved*/
                        {
                                *bufin = ' ';
                        }

                }

                bufin++;
        }
}

Taka
----------------------------------------------------------------------------
------------
This installed perfectly.  There were no problems at all and I added the
color limiter in
places that it told me to and whatnot.  did a clean compile.  No errors with
that.
So I then went on and tried using a colored title.  and there was still
colour.  Does
anyone know why?
-tarian



Reply via email to