Xual wrote: > On Mon, 8 Nov 1999, Emil Nilimaa wrote: > > > Anyone did this? > > > > I want players to not be able to use the ansi color codes.. > > so whenever they try sending a command to the mud > > including &r or whatever, they get a message like: > > "you cannot use color codes, sorry" etc. > > interpreter.c -- command_interpreter() > > if (GET_LEVEL(ch) < LVL_GOD && !IS_NPC(ch)) { > if ((strstr(argument, "&") && !strstr(argument, "&&")) || strstr(argument, "\\c")) { > send_to_char("you cannot use color codes, sorry", ch); > return; > } > } Nice solution except it will only work if the player is in the CON_PLAYING state. if the player is, for example, composing a board message, or a mudmail, or writing his description from the option off of the main menu, it will still allow the use of color codes in there. If you want to prevent players from using color codes in all states of connectedness then try something similar in game loop right before it checkes the CON_ state of players with pending input. Regards, Peter +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST