On Fri, Dec 13, 2002 at 08:59:13PM +0300, Vladimir Romanov wrote: >Hello there, Marcel! >Friday, December 13, 2002, 8:14:34 PM, you wrote: >MH> it looks like you have already some experiences with easy color. >MH> My question to you: How do you prevent that normal mortals use this color? > >That's the very problem I'm currently trying to resolve. For a >somewhat (ok, very) rough solution, you could simply prohibit using >the color code character ('&' in stock EC) in acts/says/emotes/etc. > >Put something like this somewhere in these functions: > > if (strchr(argument, '&') && (GET_LEVEL(ch) < LVL_IMMORT)) > { > send_to_char(ch, "Please do not use any special characters!\r\n"); > return; > } > >There should be a way to simply strip the amperstand from the string, >any hot red tips here? Although I never had a problem with morts using color (I tend to be nasty when they let them bleed, so that problem ends quickly) here's an idea.. Just modify process_input (I'm looking at something around bpl15 here, might've moved) to handle your color prefix (& in stock EC) just like it does with $. Another li'l function called AFTER proc_color could be like "smash_color_thingie()" and do the same as delete_doubledollar(). Just a thought. I've never tried this. >I would also love to hear if there is a way to put &n in the end of >the parse_color output. I asked that before, but nobody answered. Huh? I've modified mine to stack colors (so &n's just back out to the previous color rather than turn them straight normal. I should post this part as a patch or snippet) but unless I changed this part without remembering it, proc_color() has a line like out_buf[p]='\0'. before that, just add "strcat(out_buf, CNRM);" There's a good chance this won't do what you want, but it'll do what you asked. >With best regards, >Vladimir "Rovlad" Romanov enjoy -me -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | | Newbie List: http://groups.yahoo.com/group/circle-newbies/ | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/25/03 PDT