/***************************************************************************** * This code will allow you to put your changes in a separate text file so * * you can change it without rebooting the MUD or so you can access it from * * a website, if you'd like to post your changes there. * * * * To install this code, just #define CHANGES_FILE somewhere. I chose merc.h * * and add this somewhere appropriate. I chose act_info.c * * * * This uses Erwin's dynamic buffer code, but you can modify it to use other * * things (like a really big char array or maybe Rom2.4's buffer system. * * One other note: Since it uses fread_string, you need to put a ~ at the * * end of the file. * * * * Permission to use this code is given freely provided you email me and * * me you're using it and that my name is retained with this code. * * - Rahl (Daniel Anderson), Broken Shadows - email dwa1844@rit.edu * *****************************************************************************/ /* new_changes by Rahl */ void do_new_changes( CHAR_DATA *ch, char *argument ) { FILE *fp; char filename[200]; BUFFER *buffer = buffer_new(3000); sprintf( filename, "%s", CHANGES_FILE ); fp = fopen( filename, "r" ); if ( !fp ) return; while( 1 ) { buffer_strcat( buffer, fread_string( fp ) ); if ( feof( fp ) ) break; } fclose( fp ); page_to_char( buffer->data, ch ); buffer_free( buffer ); return; } /* __ __ _ __ __ _ ____ | \/ |_ _ __| | \/ | __ _ __ _(_) ___ / ___|___ _ __ ___ | |\/| | | | |/ _` | |\/| |/ _` |/ _` | |/ __|| | / _ \| '_ ` _ \ | | | | |_| | (_| | | | | (_| | (_| | | (__ | |__| (_) | | | | | | |_| |_|\__,_|\__,_|_| |_|\__,_|\__, |_|\___(_)____\___/|_| |_| |_| |___/ ----------------------------------------------------------------------------------- ftp://ftp.mudmagic.com/ FTP.MUDMAGIC.COM http://www.mudmagic.com/ ----------------------------------------------------------------------------------- This archive came from ftp.mudmagic.com. MudMagic.Com is a website dedicated to the further development of online text games. * Mud Host Services * Game List * Code Downloads * Links * Free Mud Client * * Public Polls * and much much more. The leading community for online text gaming. ------------------------------------------------------------------------------------ */