/********************************************************************
              Changelog snippet for AFKmud 1.76a v.2.0

Original by Xkilla on GodWars.
Converted for Smaug 1.40 by Zarius (zarius@mindcloud.com)
Converted for AFKmud 1.63 by Zarius and
                           Moonwolf on Wolf's Lair (lair@moonwolf.net)

Allows wizzes to enter changes made to the MUD into a database, which
notifies users on login of new changes, and allows them to view previous
changes.


********************************************************************/



/********************************************************************
                         Revision History
********************************************************************/

1/10/2006 - Huge rewrite for AFKMud 1.76a changing it from a table to
			a list so its more AFKMud'ish
7/28/2004 - Minor Tweaks for AFKMud 1.63 by Zarius
12/6/2003 - Initial conversion by Moonwolf@Wolf's Lair
1/29/2004 - Updated for AFK 1.61 as well as added the ability to specify
            The type of change, (i.e. Code, Area, Help, etc) - Zarius
            Also made it so its justified and made it so you can't have
            a descr less than 10 chars which screws up the justification
            code apparently.


/********************************************************************
                         Step 1 - mudcfg.h
********************************************************************/

IN output file section add the following

#define CHANGES_FILE   SYSTEM_DIR "changes.dat"

/********************************************************************
                         Step 2 - db.c
********************************************************************/

FIND ( around line 168 )

void load_corpses( void );

ADD BELOW

void load_changes( void );

/********************************************************************
                         Step 3 - db.c
********************************************************************/


FIND

   log_string( "Loading liquid table" );
   load_liquids(  );


ADD BELOW

   log_string( "Loading Changes" );
   load_changes(  );


/********************************************************************
                         Step 4 - comm.c
********************************************************************/

ADD

int num_changes( void );

to the global function declarations

/********************************************************************
                         Step 5 - comm.c
********************************************************************/
FIND

void free_slays( void );

ADD BELOW

void free_changes( void );

/********************************************************************
                         Step 6 - comm.c
********************************************************************/

FIND ( around line 2699 in function char_to_game )

HOLIDAY_DATA *day;   /* To inform incoming players of holidays - Samson 6-3-99 */

ADD BELOW

  int i;

/********************************************************************
                         Step 7 - comm.c
********************************************************************/

FIND ( around line 2800 ) (NOTE - You can put this anywhere in the function really, depending on
                                  How you want to view it)

	quotes( ch );


ADD BELOW (Change colors to your preference)

    i = num_changes();
    if(i > 0)
    {
          ch_printf( ch, "\n\r&R+++ &WThere were }R%d &d&Wchanges made to the mud code today. Type &Gchanges&W to view. &R+++&D\n\r.\n\r", i );
    }

/********************************************************************
                         Step 8 - comm.c
********************************************************************/

FIND 

   fprintf( stdout, "%s", "Slay Table.\n" );
   free_slays(  );

BELOW ADD

   fprintf( stdout, "%s", "Changes Table.\n" );
   free_changes(  );

/********************************************************************
                         Step 9 - Files
********************************************************************/

Changes.c and changes.h from the archive, put them in the src dir

Make the appropriate changes to the Makefile

/********************************************************************
                    Step 10 - Compiling and Setup
********************************************************************/

recompile the mud with make clean

restart the mud

Add the following commands:

cedit changes create
cedit changes level 1

cedit addchange create
cedit addchange level 110

cedit delchange create
cedit delchange level 110

cedit save cmdtable

Add in help files appropriate to your mud, and you're all set.

/********************************************************************
                              Credits
********************************************************************/
Xkilla for the original
Zarius for the original conversion to Smaug/AFK.
Thanks to Kathi for these updated instructions!
