diff -rbBcpP --exclude=CircleMud circle-3.1 base/lib/etc/time circle-3.1/lib/etc/time
*** circle-3.1 base/lib/etc/time	Sat Dec 14 17:16:00 2002
--- circle-3.1/lib/etc/time	Tue Dec 31 16:59:11 2002
***************
*** 1 ****
! 650336835
--- 1 ----
! 650337026
diff -rbBcpP --exclude=CircleMud circle-3.1 base/src/Makefile circle-3.1/src/Makefile
*** circle-3.1 base/src/Makefile	Thu Dec 12 16:03:21 2002
--- circle-3.1/src/Makefile	Wed Dec 25 23:29:06 2002
*************** OBJFILES = act.comm.o act.informative.o 
*** 30,36 ****
  	graph.o handler.o house.o interpreter.o limits.o magic.o mail.o \
  	mobact.o modify.o objsave.o olc.o random.o shop.o spec_assign.o \
  	spec_procs.o spell_parser.o spells.o utils.o weather.o \
! 	bsd-snprintf.o
  
  CXREF_FILES = act.comm.c act.informative.c act.item.c act.movement.c \
  	act.offensive.c act.other.c act.social.c act.wizard.c alias.c ban.c \
--- 30,36 ----
  	graph.o handler.o house.o interpreter.o limits.o magic.o mail.o \
  	mobact.o modify.o objsave.o olc.o random.o shop.o spec_assign.o \
  	spec_procs.o spell_parser.o spells.o utils.o weather.o \
! 	bsd-snprintf.o string_replacer.o
  
  CXREF_FILES = act.comm.c act.informative.c act.item.c act.movement.c \
  	act.offensive.c act.other.c act.social.c act.wizard.c alias.c ban.c \
*************** CXREF_FILES = act.comm.c act.informative
*** 38,44 ****
  	graph.c handler.c house.c interpreter.c limits.c magic.c mail.c \
  	mobact.c modify.c objsave.c olc.c random.c shop.c spec_assign.c\
  	spec_procs.c spell_parser.c spells.c utils.c weather.c \
! 	bsd-snprintf.c
  
  default: all
  
--- 38,44 ----
  	graph.c handler.c house.c interpreter.c limits.c magic.c mail.c \
  	mobact.c modify.c objsave.c olc.c random.c shop.c spec_assign.c\
  	spec_procs.c spell_parser.c spells.c utils.c weather.c \
! 	bsd-snprintf.c string_replacer.c
  
  default: all
  
*************** weather.o: weather.c conf.h sysdep.h str
*** 205,207 ****
--- 205,209 ----
  	$(CC) -c $(CFLAGS) weather.c
  bsd-snprintf.o: bsd-snprintf.c conf.h sysdep.h
  	$(CC) -c $(CFLAGS) bsd-snprintf.c
+ string_replacer.o: string_replacer.c conf.h sysdep.h structs.h utils.h string_replacer.h
+ 	$(CC) -c $(CFLAGS) string_replacer.c
diff -rbBcpP --exclude=CircleMud circle-3.1 base/src/Makefile.amiga circle-3.1/src/Makefile.amiga
*** circle-3.1 base/src/Makefile.amiga	Mon Nov 18 13:23:38 2002
--- circle-3.1/src/Makefile.amiga	Wed Dec 25 23:21:26 2002
*************** OBJFILES = comm.o act.comm.o act.informa
*** 24,30 ****
  	castle.o class.o config.o constants.o db.o fight.o graph.o handler.o \
  	house.o interpreter.o limits.o magic.o mail.o mobact.o modify.o \
  	objsave.o olc.o shop.o spec_assign.o spec_procs.o spell_parser.o \
! 	spells.o utils.o weather.o alias.o
  
  default: .accepted
  	$(MAKE) ../bin/circle
--- 24,30 ----
  	castle.o class.o config.o constants.o db.o fight.o graph.o handler.o \
  	house.o interpreter.o limits.o magic.o mail.o mobact.o modify.o \
  	objsave.o olc.o shop.o spec_assign.o spec_procs.o spell_parser.o \
! 	spells.o utils.o weather.o alias.o string_replacer.o
  
  default: .accepted
  	$(MAKE) ../bin/circle
*************** utils.o: utils.c conf.h sysdep.h structs
*** 210,212 ****
--- 210,214 ----
  weather.o: weather.c conf.h sysdep.h structs.h utils.h comm.h handler.h \
    interpreter.h db.h
  	$(CC) -c $(CFLAGS) weather.c
+ string_replacer.o: string_replacer.c conf.h sysdep.h structs.h utils.h 
+ 	$(CC) -c $(CFLAGS) string_replacer.c
diff -rbBcpP --exclude=CircleMud circle-3.1 base/src/Makefile.arc circle-3.1/src/Makefile.arc
*** circle-3.1 base/src/Makefile.arc	Mon Nov 18 13:23:38 2002
--- circle-3.1/src/Makefile.arc	Tue Dec 31 15:59:24 2002
*************** OBJFILES = o.comm act.o.comm act.o.infor
*** 26,32 ****
  	o.castle o.class o.config o.constants o.db o.fight o.graph o.handler \
  	o.house o.interpreter o.limits o.magic o.mail o.mobact o.modify \
  	o.objsave o.olc o.random o.shop o.spec_assign o.spec_procs \
! 	o.spell_parser o.spells o.utils o.weather o.alias
  
  default:	all
  
--- 26,32 ----
  	o.castle o.class o.config o.constants o.db o.fight o.graph o.handler \
  	o.house o.interpreter o.limits o.magic o.mail o.mobact o.modify \
  	o.objsave o.olc o.random o.shop o.spec_assign o.spec_procs \
! 	o.spell_parser o.spells o.utils o.weather o.alias string_replacer.o
  
  default:	all
  
*************** o.utils: c.utils h.conf h.sysdep h.struc
*** 153,155 ****
--- 153,157 ----
  o.weather: c.weather h.conf h.sysdep h.structs h.utils h.comm h.handler \
    h.interpreter h.db
  	$(CC) -c $(CFLAGS) c.weather
+ o.string_replacer: c.string_replacer h.conf h.sysdep h.structs h.utils h.string_replacer 
+ 	$(CC) -c $(CFLAGS) c.string_replacer
diff -rbBcpP --exclude=CircleMud circle-3.1 base/src/Makefile.bcc circle-3.1/src/Makefile.bcc
*** circle-3.1 base/src/Makefile.bcc	Sun Apr 11 19:19:00 1999
--- circle-3.1/src/Makefile.bcc	Wed Dec 25 23:24:16 2002
*************** Dep_circledexe = \
*** 79,85 ****
     spec_procs.obj\
     spec_assign.obj\
     utils.obj\
!    weather.obj
  
  circle.exe : $(Dep_circledexe)
    $(TLINK32) @&&|
--- 79,86 ----
     spec_procs.obj\
     spec_assign.obj\
     utils.obj\
!    weather.obj\
!    string_replacer.obj
  
  circle.exe : $(Dep_circledexe)
    $(TLINK32) @&&|
*************** spell_parser.obj+
*** 121,127 ****
  spec_procs.obj+
  spec_assign.obj+
  utils.obj+
! weather.obj
  $<,$*
  C:\BC5\LIB\bidsfi.lib+
  C:\BC5\LIB\import32.lib+
--- 122,129 ----
  spec_procs.obj+
  spec_assign.obj+
  utils.obj+
! weather.obj+
! string_replacer.obj
  $<,$*
  C:\BC5\LIB\bidsfi.lib+
  C:\BC5\LIB\import32.lib+
*************** utils.obj :  utils.c
*** 312,317 ****
--- 314,324 ----
  weather.obj :  weather.c
    $(BCC32) -P- -c @&&|
   $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ weather.c
+ |
+ 
+ string_replacer.obj :  string_replacer.c
+   $(BCC32) -P- -c @&&|
+  $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ string_replacer.c
  |
  
  # Compiler configuration file
diff -rbBcpP --exclude=CircleMud circle-3.1 base/src/Makefile.bcc55 circle-3.1/src/Makefile.bcc55
*** circle-3.1 base/src/Makefile.bcc55	Thu May 24 06:37:14 2001
--- circle-3.1/src/Makefile.bcc55	Wed Dec 25 23:25:20 2002
*************** Dep_circledexe = \
*** 80,86 ****
     spec_procs.obj\
     spec_assign.obj\
     utils.obj\
!    weather.obj
  
  circle.exe : $(Dep_circledexe)
    $(TLINK32) @&&|
--- 80,87 ----
     spec_procs.obj\
     spec_assign.obj\
     utils.obj\
!    weather.obj\
!    string_replacer.obj
  
  circle.exe : $(Dep_circledexe)
    $(TLINK32) @&&|
*************** spell_parser.obj+
*** 122,128 ****
  spec_procs.obj+
  spec_assign.obj+
  utils.obj+
! weather.obj
  $<,$*
  C:\BORLAND\BCC55\LIB\import32.lib+
  C:\BORLAND\BCC55\LIB\cw32i.lib
--- 123,130 ----
  spec_procs.obj+
  spec_assign.obj+
  utils.obj+
! weather.obj+
! string_replacer.obj
  $<,$*
  C:\BORLAND\BCC55\LIB\import32.lib+
  C:\BORLAND\BCC55\LIB\cw32i.lib
*************** utils.obj :  utils.c
*** 311,316 ****
--- 313,323 ----
  weather.obj :  weather.c
    $(BCC32) -P- -c @&&|
   $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ weather.c
+ |
+ 
+ string_replacer.obj :  string_replacer.c
+   $(BCC32) -P- -c @&&|
+  $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ string_replacer.c
  |
  
  # Compiler configuration file
diff -rbBcpP --exclude=CircleMud circle-3.1 base/src/Makefile.in circle-3.1/src/Makefile.in
*** circle-3.1 base/src/Makefile.in	Mon Nov 18 13:23:38 2002
--- circle-3.1/src/Makefile.in	Wed Dec 25 23:26:24 2002
*************** OBJFILES = act.comm.o act.informative.o 
*** 29,35 ****
  	graph.o handler.o house.o interpreter.o limits.o magic.o mail.o \
  	mobact.o modify.o objsave.o olc.o random.o shop.o spec_assign.o \
  	spec_procs.o spell_parser.o spells.o utils.o weather.o \
! 	bsd-snprintf.o
  
  CXREF_FILES = act.comm.c act.informative.c act.item.c act.movement.c \
  	act.offensive.c act.other.c act.social.c act.wizard.c alias.c ban.c \
--- 29,35 ----
  	graph.o handler.o house.o interpreter.o limits.o magic.o mail.o \
  	mobact.o modify.o objsave.o olc.o random.o shop.o spec_assign.o \
  	spec_procs.o spell_parser.o spells.o utils.o weather.o \
! 	bsd-snprintf.o string_replacer.o
  
  CXREF_FILES = act.comm.c act.informative.c act.item.c act.movement.c \
  	act.offensive.c act.other.c act.social.c act.wizard.c alias.c ban.c \
*************** CXREF_FILES = act.comm.c act.informative
*** 37,43 ****
  	graph.c handler.c house.c interpreter.c limits.c magic.c mail.c \
  	mobact.c modify.c objsave.c olc.c random.c shop.c spec_assign.c\
  	spec_procs.c spell_parser.c spells.c utils.c weather.c \
! 	bsd-snprintf.c
  
  default: all
  
--- 37,43 ----
  	graph.c handler.c house.c interpreter.c limits.c magic.c mail.c \
  	mobact.c modify.c objsave.c olc.c random.c shop.c spec_assign.c\
  	spec_procs.c spell_parser.c spells.c utils.c weather.c \
! 	bsd-snprintf.c string_replacer.c
  
  default: all
  
*************** weather.o: weather.c conf.h sysdep.h str
*** 204,206 ****
--- 204,208 ----
  	$(CC) -c $(CFLAGS) weather.c
  bsd-snprintf.o: bsd-snprintf.c conf.h sysdep.h
  	$(CC) -c $(CFLAGS) bsd-snprintf.c
+ string_replacer.o: string_replacer.c conf.h sysdep.h structs.h utils.h string_replacer.h
+ 	$(CC) -c $(CFLAGS) string_replacer.c
diff -rbBcpP --exclude=CircleMud circle-3.1 base/src/Makefile.lcc circle-3.1/src/Makefile.lcc
*** circle-3.1 base/src/Makefile.lcc	Mon Nov 18 13:23:38 2002
--- circle-3.1/src/Makefile.lcc	Tue Dec 31 16:00:21 2002
*************** OBJS=\
*** 52,58 ****
  	act.item.obj \
  	act.informative.obj \
  	act.comm.obj \
! 	alias.obj
  
  LIBS=$(LCCDIR)\lib\wsock32.lib
  
--- 52,60 ----
  	act.item.obj \
  	act.informative.obj \
  	act.comm.obj \
! 	alias.obj \
!         string_replacer.obj
! 
  
  LIBS=$(LCCDIR)\lib\wsock32.lib
  
*************** ALIAS_C=\
*** 563,566 ****
--- 565,578 ----
  
  alias.obj: $(ALIAS_C) $(DISTDIR)\src\alias.c
      $(CC)  $(CFLAGS) $(DISTDIR)\src\alias.c
+ 
+ # Build STRING_REPLACER.C
+ STRING_REPLACER_C=\
+     $(DISTDIR)\src\sysdep.h\
+     $(DISTDIR)\src\structs.h\
+     $(DISTDIR)\src\utils.h\
+     $(DISTDIR)\src\string_replacer.h\
+ 
+ string_replacer.obj: $(STRING_REPLACER_C) $(DISTDIR)\src\string_replacer.c
+     $(CC)  $(CFLAGS) $(DISTDIR)\src\string_replacer.c
  
diff -rbBcpP --exclude=CircleMud circle-3.1 base/src/Makefile.msvc circle-3.1/src/Makefile.msvc
*** circle-3.1 base/src/Makefile.msvc	Mon Nov 18 13:23:38 2002
--- circle-3.1/src/Makefile.msvc	Wed Dec 25 23:27:20 2002
*************** OBJFILES = comm.obj act.comm.obj act.inf
*** 40,46 ****
          castle.obj class.obj config.obj constants.obj db.obj fight.obj graph.obj handler.obj \
          house.obj interpreter.obj limits.obj magic.obj mail.obj mobact.obj modify.obj \
          objsave.obj olc.obj shop.obj spec_assign.obj spec_procs.obj spell_parser.obj \
!         spells.obj utils.obj weather.obj random.obj alias.obj
  
  default: circle.exe
          $(MAKE) circle.exe
--- 40,46 ----
          castle.obj class.obj config.obj constants.obj db.obj fight.obj graph.obj handler.obj \
          house.obj interpreter.obj limits.obj magic.obj mail.obj mobact.obj modify.obj \
          objsave.obj olc.obj shop.obj spec_assign.obj spec_procs.obj spell_parser.obj \
!         spells.obj utils.obj weather.obj random.obj alias.obj string_replacer.obj
  
  default: circle.exe
          $(MAKE) circle.exe
*************** utils.obj: utils.c conf.h sysdep.h struc
*** 156,158 ****
--- 156,160 ----
  weather.obj: weather.c conf.h sysdep.h structs.h utils.h comm.h handler.h \
    interpreter.h db.h
  	$(CC) -c $(CFLAGS) weather.c
+ string_replacer.obj: string_replacer.c conf.h sysdep.h structs.h utils.h string_replacer.h
+ 	$(CC) -c $(CFLAGS) string_replacer.c
diff -rbBcpP --exclude=CircleMud circle-3.1 base/src/Makefile.os2 circle-3.1/src/Makefile.os2
*** circle-3.1 base/src/Makefile.os2	Mon Nov 18 13:23:38 2002
--- circle-3.1/src/Makefile.os2	Wed Dec 25 23:28:07 2002
*************** OBJFILES = comm.o act.comm.o act.informa
*** 26,32 ****
          castle.o class.o config.o constants.o db.o fight.o graph.o handler.o \
          house.o interpreter.o limits.o magic.o mail.o mobact.o modify.o \
          objsave.o olc.o shop.o spec_assign.o spec_procs.o spell_parser.o \
!         spells.o utils.o weather.o random.o alias.o
  
  default: .accepted
          $(MAKE) ../bin/circle
--- 26,32 ----
          castle.o class.o config.o constants.o db.o fight.o graph.o handler.o \
          house.o interpreter.o limits.o magic.o mail.o mobact.o modify.o \
          objsave.o olc.o shop.o spec_assign.o spec_procs.o spell_parser.o \
!         spells.o utils.o weather.o random.o alias.o string_replacer.o
  
  default: .accepted
          $(MAKE) ../bin/circle
*************** utils.o: utils.c conf.h sysdep.h structs
*** 212,214 ****
--- 212,216 ----
  weather.o: weather.c conf.h sysdep.h structs.h utils.h comm.h handler.h \
    interpreter.h db.h
          $(CC) -c $(CFLAGS) weather.c
+ string_replacer.o: string_replacer.c conf.h sysdep.h structs.h utils.h string_replacer.h
+         $(CC) -c $(CFLAGS) string_replacer.c
diff -rbBcpP --exclude=CircleMud circle-3.1 base/src/string_replacer.c circle-3.1/src/string_replacer.c
*** circle-3.1 base/src/string_replacer.c	Wed Dec 31 18:00:00 1969
--- circle-3.1/src/string_replacer.c	Tue Dec 31 18:24:22 2002
***************
*** 0 ****
--- 1,223 ----
+ /* ************************************************************************
+ *   File: string_replacer.c                     Modification to CircleMUD *
+ *  Usage: source file: implementation of public string replacer functions *
+ *                                                                         *
+ ************************************************************************ */
+ 
+ #include "conf.h"
+ #include "sysdep.h"
+ 
+ #include "structs.h"
+ #include "utils.h"
+ #include "string_replacer.h"
+ 
+ String_Replacer_IsLegal IsLegal = NULL;
+ String_Replacer_DoCalc doCalc = NULL;
+ String_Replacer_DoFilter doFilter = NULL;
+ 
+ static char out_buf[MAX_STRING_LENGTH],insert_text[256];
+ 
+ /* this function sets the Legal  function that actually checks the text token to see if it's one it's looking for */
+ void SetIsLegal(String_Replacer_IsLegal inLegal)
+ {
+ 	IsLegal = inLegal;
+ }
+ 
+ /* this function sets the Calculation function that can be used to generate varying text tokens for found text tokens */
+ void SetCalc(String_Replacer_DoCalc inCalc)
+ {
+ 	doCalc = inCalc;
+ }
+ 
+ /* this function set the filter function DoFilter function that determines if the text token is filtered. */
+ void SetDoFilter(String_Replacer_DoFilter inFilter)
+ {
+ 	doFilter = inFilter;
+ }
+ 
+ /* this function replaces text tokens with some other text token */
+ char *StringReplacer(const char *inbuf, struct parse_struct *table, char startChar, 
+ 		  void *theUserData, int clearSettings)
+ {
+ 	int inpos = 0, outpos = 0;
+ 	int length = strlen(inbuf), counter = 0;
+ 	int found = FALSE, sChars = 0;
+   int sLength;
+   
+ 	*out_buf = '\0'; 
+ 
+ 	if(*inbuf == '\0') {
+ 		if(clearSettings) {
+ 			doCalc = NULL;
+ 			IsLegal = NULL;
+ 		}
+ 		return(out_buf); /* if first char is null */ 
+ 	}
+ 	
+ 	if(IsLegal == NULL) {
+ 		log("SYSERR: string_replacer called without a valid IsLegal function!");
+ 		return(out_buf);
+ 	}
+ 	
+ 	*insert_text = '\0';
+ 
+   if(startChar == '\0')
+     sLength = 0;
+    else
+     sLength = 1;
+     
+ 	while(inpos < length)
+ 	{
+ 		if(inbuf[inpos] == startChar || startChar == '\0')
+ 		{ 
+ 			*insert_text = '\0';
+ 			
+ 			sChars = 0;
+ 			while(inbuf[inpos+sLength] == startChar) {
+ 				sChars++;
+ 				inbuf++;
+ 			}
+ 			found = FALSE;
+ 			for(counter = 0; *table[counter].code !='\0'; counter++)
+ 			{
+ 				// this makes sure the code isnt longer then remaining string
+ 				// if it is longer can't be this code so continue.
+ 				if(strlen(table[counter].code) > (length - inpos))
+ 					continue;
+ 				
+ 				// do a strcmp on the code and text to see if it's the code	
+ 				if(!strncmp(inbuf+(inpos+sLength), table[counter].code, strlen(table[counter].code))) {
+ 					// the code is found so we put the real code in insert_text and advance
+ 					// the inpos counter then break out the loop since we found our code.
+ 					// but first do a quick check on the color level and if the level 
+ 					// isnt high enough for it then we skip the color code but do the rest.
+ 					if(IsLegal(table[counter].code, table[counter].user_type, theUserData))
+ 						strcat(insert_text, table[counter].real_code);
+ 
+ 					inpos += strlen(table[counter].code) + sLength;
+ 					found = TRUE;
+ 					break;
+ 				}
+ 			}
+                         /* now we call the calculation function to let it generate a string if this code requires it */
+ 			if(*insert_text == '\0' && found) {
+ 				if(doCalc == NULL)
+ 					log("SYSERR: table passed to string_replacer has codes that look to need a calculation\r\n"
+ 							"    	   done but no function was specfied to perform them!");
+ 				else
+ 					strcat(insert_text, doCalc(inbuf, insert_text, &inpos, counter, theUserData));
+ 			} else if(!found) {
+ 				insert_text[0] = inbuf[inpos++];
+ 				insert_text[1] = '\0';
+ 			}
+ 			
+ 			
+ 			/* don't overfill buffer */
+ 			if((strlen(out_buf)+strlen(insert_text)+sChars) < MAX_STRING_LENGTH)
+ 			{ 
+ 				/* so strcat is not confused by whatever out_buf WAS */
+ 			  out_buf[outpos] = '\0';
+                             /* insert the extra start characters that we found */
+ 			  for(; sChars > 0; sChars--)
+ 			  	out_buf[outpos++] = startChar; 
+ 			  out_buf[outpos] = '\0';
+ 			  strcat(out_buf,insert_text);  
+ 			  outpos = strlen(out_buf);
+ 			}
+ 
+ 		} else { /* if char is '/' (START_CHAR) */
+ 		  if(outpos < MAX_STRING_LENGTH)
+ 			{
+ 				out_buf[outpos++] = inbuf[inpos++]; 
+ 			}
+ 		}
+   }
+   
+ 	out_buf[outpos] = '\0';
+ 
+ 	if(clearSettings) {
+ 		doCalc = NULL;
+ 		IsLegal = NULL;
+ 	}
+ 	return(out_buf);
+ }
+ 
+ /* this function filters text tokens from the string if they meet some criteria */
+ char *FilterString(const char *inbuf, struct parse_struct *table, char startChar,
+ 		  void *theUserData, int clearSettings)
+ {
+ 	register int inpos = 0, outpos = 0;
+ 	int length = strlen(inbuf), counter = 0;
+ 	int filter = FALSE, sChars = 0;
+ 	
+ 	*out_buf = '\0'; 
+ 
+ 	if(doFilter == NULL) {
+ 		log("SYSERR: string_replacer called without a valid IsLegal function!");
+ 		return(out_buf);
+ 	}
+ 
+ 	if(*inbuf == '\0') {
+ 		if(clearSettings) 
+ 			doFilter = NULL;
+ 		return(out_buf); /* if first char is null */ 
+ 	}
+ 
+ 	while(inpos < length) {
+ 		if(inbuf[inpos]==startChar) { 
+ 			sChars = 0;
+ 			while(inbuf[inpos+1] == startChar) {
+ 				sChars++;
+ 				inbuf++;
+ 			}
+ 			filter = FALSE;
+ 			for(counter = 0; *table[counter].code !='\0'; counter++) {
+ 				// this makes sure the code isnt longer then remaining string
+ 				// if it is longer can't be this code so continue.
+ 				if(strlen(table[counter].code) > (length - inpos))
+ 					continue;
+ 				
+ 				// do a strcmp on the code and text to see if it's the code	
+ 				if(!strncmp(inbuf+(inpos+1), table[counter].code, strlen(table[counter].code))) {
+ 					// the code is found so we put the real code in insert_text and advance
+ 					// the inpos counter then break out the loop since we found our code.
+ 					// but first do a quick check on the color level and if the level 
+ 					// isnt high enough for it then we skip the color code but do the rest.
+ 					if((filter = doFilter(table[counter].user_type, theUserData))) {
+ 						inpos += strlen(table[counter].code) + 1;
+ 					}
+ 					break;
+ 				}
+ 			}
+ 			
+ 		}
+                 /* ok someone passed a bunch of the start characters togther need to put them back in minus one if we found a code to filter. */
+ 		if(filter)
+ 			sChars--;
+ 
+ 		for(; sChars > 0; sChars--)
+ 			out_buf[outpos++] = startChar;
+ 
+ 		out_buf[outpos++] = inbuf[inpos++]; 
+ 	}
+ 	out_buf[outpos] = '\0';
+ 
+ 	if(clearSettings) 
+ 		doFilter = NULL;
+ 
+ 	return(out_buf);
+ }
+ 
+ /* this function just clears out the hook functions after the StringReplacer function is done so that we don't get unexpected results */
+ void clearStringReplacer(void)
+ {
+ 	doCalc = NULL;
+ 	IsLegal = NULL;
+ 	doFilter = NULL;
+ }
+ 
+ /* this function just clears out the hook functions after the FilerString function is done so that we don't get unexpected results */
+ void clearFilterString(void)
+ {
+ 	doFilter = NULL;
+ }
diff -rbBcpP --exclude=CircleMud circle-3.1 base/src/string_replacer.h circle-3.1/src/string_replacer.h
*** circle-3.1 base/src/string_replacer.h	Wed Dec 31 18:00:00 1969
--- circle-3.1/src/string_replacer.h	Tue Dec 31 18:23:29 2002
***************
*** 0 ****
--- 1,28 ----
+ /* ************************************************************************
+ *   File: string_replacer.h                     Modification to CircleMUD *
+ *  Usage: header file: prototypes of public string replacer functions     *
+ *                                                                         *
+ ************************************************************************ */
+ 
+ struct parse_struct {
+ 	char *code; /* holds the tag after the start character */
+ 	void *user_type; /* holds user specfies type be it an int or struct */
+ 	char *real_code; /* actual code for tage or \0 for a calculateded code */
+ };
+ 
+ /* function typedefs for the hook functions */
+ typedef int (*String_Replacer_IsLegal)(char *buffer, void *user_type, void *userData);
+ typedef char *(*String_Replacer_DoCalc)(const char *inbuffer, char *outBuffer, int *inpos, int index, void *userData);
+ typedef int (*String_Replacer_DoFilter)(void *user_type, void *userData);
+ 
+ void SetIsLegal(String_Replacer_IsLegal inLegal);
+ void SetCalc(String_Replacer_DoCalc inCalc);
+ void SetDoFilter(String_Replacer_DoFilter inCalc);
+ 
+ char *StringReplacer(const char *inbuf, struct parse_struct *table, char startChar,
+ 		  void *theUserData, int clearSettings);
+ char *FilterString(const char *inbuf, struct parse_struct *table, char startChar,
+ 		  void *theUserData, int clearSettings);
+ 		  
+ void clearStringReplacer(void);
+ void clearFilterString(void);

