version.c
legend/src/version.c · 3.8 KB
From the archive LoCRelease.tgz
Download the archive « Back to the archive contents
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
* *
* Merc Diku Mud improvments copyright (C) 1992, 1993 by Michael *
* Chastain, Michael Quan, and Mitchell Tse. *
* *
* In order to use any part of this Merc Diku Mud, you must comply with *
* both the original Diku license in 'license.doc' as well the Merc *
* license in 'license.txt'. In particular, you may not remove either of *
* these copyright notices. *
* *
* Much time and thought has gone into this software and you are *
* benefitting. We hope that you share your changes too. What goes *
* around, comes around. *
***************************************************************************/
/***************************************************************************
* God Wars Mud copyright (C) 1994, 1995, 1996 by Richard Woolcock *
* *
* Legend of Chrystancia copyright (C) 1999, 2000, 2001 by Matthew Little *
* This mud is NOT to be copied in whole or in part, or to be run without *
* the permission of Matthew Little. Nobody else has permission to *
* authorise the use of this code. *
***************************************************************************/
#if defined(macintosh)
#include <types.h>
#else
#include <sys/types.h>
#endif
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <assert.h>
#include <unistd.h>
#include <stdarg.h>
#include <limits.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include "merc.h"
#include "version.h"
#include "build.h"
const char *versionToString (int version)
{
static char buf[64];
sprintf (buf, "%d.%02d.%02d", version / 10000,
(version - ((10000 * (version / 10000)))) / 100, version % 100);
return buf;
}
void do_version (CHAR_DATA * ch, char *argument)
{
cent_to_char
("#e-----------------------------------------------------------------------------",
ch);
sprintf (log_buf,
"#CLegend of Chrystancia Version: #w%s#C. Build: #w%d #C: #w%s#C.",
versionToString (VERSION), LINKCOUNT, compdate(COMPILE_TIME));
cent_to_char (log_buf, ch);
cent_to_char
("#CGod Wars Mud improvements copyright © 1994 - 1996 by #wRichard Woolcock",
ch);
cent_to_char
("#CLegend of Chrystancia improvements copyright © 1999 - 2006 by #wMatthew Little.",
ch);
cent_to_char("#CAll Rights Reserved.", ch);
cent_to_char
("#CLegend of Chrystancia was created by #wTijer", ch);
cent_to_char
("#CBased upon GodWars created by #wKaVir#C, and Merc 2.1 by #wFurey#C, #wHatchet#C, and #wKahn",
ch);
cent_to_char
("#e-----------------------------------------------------------------------------",
ch);
cent_to_char ("#CAdmin Email: #wTijer@godwars.net#n", ch);
cent_to_char ("#CHosted by #wAmber#C: http://www.amber.org.uk#C.",ch);
cent_to_char
("#e-----------------------------------------------------------------------------",
ch);
return;
}