act_chans.h

act_chans.h · 2.2 KB

From the archive act_chans_1.0.zip

Download the archive   « Back to the archive contents

/*
 * act_chans()
 *
 * This is my channel handler. The orginal code for public_ch
 * Writen by Blade, as is freeware.
 * http://www.algonet.se/~rnen/mud/code.html (only refrence i can find now)
 *
 * This code will dynamicly update a webpage with the list of chat messages
 * in reverse chornilogical order (spelling ;)
 *
 * Uses a linked list to store the chat messages.. since its not saved, every
 * copyover cleans it out.
 *
 * Intregration added with e107 web content magament system, makes it
 * look all nice and pretty ;)
 *
 * Requires the use of htm_colorconvert by Nebiseni of Clandestine mud.
 * In lue of the snippet, just remove the conversion, or filter the
 * strings through strip_color()
 *
 * Licence agreement:
 *
 *  #1: Follow Previous Diku/Merc/Rom Licences, or whatever is applicable
 *      to your codebase.
 *  #2: Email/Contact Myself telling me your using it, and how cool I am
 *  #3: My name and link appearing in your help 'CREDITS' entry
 *  #4: This entire comment must be left in the file, unchanged.
 *
 *  Just remember, what comes around, goes around.
 *
 * -Thri, owner/operator of Vandagard Mud: The Darkness
 * Cyhawk/Thri/Marumine
 *
 * Web addy:    http://vandagard.slayn.net
 * email:       cyhawkx@gmail.com
 * AIM:         CalibanL
 *
 * Special thanks to: Nebseni of Clandestine mud for his contributions
 *      http://cland.dustbite.net/
 * Special thanks to: Drey of Underworld dreams for making a web chatlog for me to copy ;)
 *      http://dreams.daestroke.com
 */
 
 
/* Define for if the code is on my server or not,
 * put in here because for the life of me, I cant get
 * sql to work.. plus the paths are different ;)
 */
#ifdef ONSERVER
#define CHANLOG_FILE    "../../public_html/chanlog.php"
#else
#define CHANLOG_FILE   "../web/chanlog.php"
#endif

typedef struct chanlist_data
{
    struct chanlist_data *next;     /* next: it's vital this is the first field! */
    char *name;                     /* Name of the player */
    char *message;
    char *time;
    char *chan;

} CHANLOG;

void update_chanlist                (char * message, char * time, char * who, char * chan);
void update_chatlog                 (void);

Site Stats

Snippets: 1791
Codebases: 571