"MPROGS" Current number of mobile program lines.
"OPROGS" Current number of object program lines.
"RPROGS" Current number of room program lines.
"MUDPROGS" Current number of mud program lines.
"WORLDS" Current number of worlds, use "0" if worldless.
"SKILLS" Number of skills, use "0" if skill-less.
"RESETS" Current number of resets.
"MPROGS" Current number of mobile program lines.
"OPROGS" Current number of object program lines.
"RPROGS" Current number of room program lines.
"MUDPROGS" Current number of mud program lines.
int process_sb_new_environ( DESCRIPTOR_DATA *d, unsigned char *src, int srclen )
{
char var[MAX_INPUT_LENGTH], val[MAX_INPUT_LENGTH];
char *pto;
int i;
var[0] = val[0] = 0;
i = 4;
while (i < srclen && src[i] != SE)
{
switch (src[i])
{
case ENV_VAR:
case ENV_USR:
i++;
pto = var;
while (i < srclen && src[i] >= 32 && src[i] != IAC)
{
*pto++ = src[i++];
}
*pto = 0;
break;
case ENV_VAL:
i++;
pto = val;
while (i < srclen && src[i] >= 32 && src[i] != IAC)
{
*pto++ = src[i++];
}
*pto = 0;
if (!strcasecmp(var, "SYSTEMTYPE") && !strcasecmp(val, "WIN32"))
{
RESTRING(d->terminal_type, "WIN32");
SET_BIT(d->comm_flags, COMM_FLAG_ECHO);
}
break;
default:
i++;
break;
}
}
return UMIN(i + 1, srclen);
}
int process_do_mssp( DESCRIPTOR_DATA *d, unsigned char *src, int srclen )
{
char buf[MAX_STRING_LENGTH], tmp[MAX_STRING_LENGTH];
sprintf(buf, "%c%c%c", IAC, SB, TELOPT_MSSP);
sprintf(tmp, "%c%s%c%d" "%c%s%c%d",
MSSP_VAR, "PLAYERS", MSSP_VAL, mud->total_plr,
MSSP_VAR, "UPTIME", MSSP_VAL, mud->boot_time);
strcat(buf, tmp);
sprintf(tmp, "%c%s%c%s" "%c%s%c%s" "%c%s%c%s" "%c%s%c%s" "%c%s%c%s" "%c%s%c%s" "%c%s%c%s" "%c%s%c%s" "%c%s%c%s" "%c%s%c%s" "%c%s%c%s" "%c%s%c%s" "%c%s%c%s",
MSSP_VAR, "CODEBASE", MSSP_VAL, "BubbaMud 1.3",
MSSP_VAR, "CONTACT", MSSP_VAL, "pumpkin@bubba.com",
MSSP_VAR, "CREATED", MSSP_VAL, "1999",
MSSP_VAR, "HOSTNAME", MSSP_VAL, "bubba.com",
MSSP_VAR, "ICON", MSSP_VAL, "http://bubba.com/icon.gif",
MSSP_VAR, "IP", MSSP_VAL, "204.123.20.117",
MSSP_VAR, "LANGUAGE", MSSP_VAL, "English",
MSSP_VAR, "LOCATION", MSSP_VAL, "Sweden",
MSSP_VAR, "MINIMUM AGE", MSSP_VAL, "15",
MSSP_VAR, "NAME", MSSP_VAL, "Bubba Mud",
MSSP_VAR, "PORT", MSSP_VAL, "4321",
MSSP_VAR, "PREROGATIVE", MSSP_VAL, "BobMud",
MSSP_VAR, "WEBSITE", MSSP_VAL, "http://bubba.com");
strcat(buf, tmp);
sprintf(tmp, "%c%s%c%s" "%c%s%c%s" "%c%s%c%s" "%c%s%c%s" "%c%s%c%s",
MSSP_VAR, "GENRE", MSSP_VAL, "Fantasy",
MSSP_VAR, "STATUS", MSSP_VAL, "LIVE",
MSSP_VAR, "SUBGENRE", MSSP_VAL, "Medieval Fantasy",
MSSP_VAR, "GAMEPLAY", MSSP_VAL, "Hack and Slash",
MSSP_VAR, "GAMESYSTEM", MSSP_VAL, "Custom");
strcat(buf, tmp);
sprintf(tmp, "%c%s%c%d" "%c%s%c%d" "%c%s%c%d" "%c%s%c%d" "%c%s%c%d" "%c%s%c%d",
MSSP_VAR, "AREAS", MSSP_VAL, mud->top_area,
MSSP_VAR, "HELPFILES", MSSP_VAL, mud->top_help,
MSSP_VAR, "MOBILES", MSSP_VAL, mud->top_mob_index,
MSSP_VAR, "OBJECTS", MSSP_VAL, mud->top_obj_index,
MSSP_VAR, "ROOMS", MSSP_VAL, mud->top_room,
MSSP_VAR, "RESETS", MSSP_VAL, mud->top_reset);
strcat(buf, tmp);
sprintf(tmp, "%c%s%c%d" "%c%s%c%d",
MSSP_VAR, "MUDPROGS", MSSP_VAL, mud->top_mprog,
MSSP_VAR, "MUDTRIGS", MSSP_VAL, mud->top_mtrig);
strcat(buf, tmp);
sprintf(tmp, "%c%s%c%d" "%c%s%c%d" "%c%s%c%d" "%c%s%c%d" "%c%s%c%d",
MSSP_VAR, "CLASSES", MSSP_VAL, MAX_CLASS,
MSSP_VAR, "LEVELS", MSSP_VAL, MAX_LEVEL,
MSSP_VAR, "RACES", MSSP_VAL, MAX_RACE,
MSSP_VAR, "SKILLS", MSSP_VAL, MAX_SKILL,
MSSP_VAR, "WORLDS", MSSP_VAL, 1);
strcat(buf, tmp);
sprintf(tmp, "%c%s%c%d" "%c%s%c%d" "%c%s%c%d" "%c%s%c%d" "%c%s%c%d" "%c%s%c%d" "%c%s%c%d" "%c%s%c%d",
MSSP_VAR, "ANSI", MSSP_VAL, 1,
MSSP_VAR, "MCCP", MSSP_VAL, 1,
MSSP_VAR, "MCP", MSSP_VAL, 0,
MSSP_VAR, "MSP", MSSP_VAL, 0,
MSSP_VAR, "MXP", MSSP_VAL, 0,
MSSP_VAR, "PUEBLO", MSSP_VAL, 0,
MSSP_VAR, "VT100", MSSP_VAL, 1,
MSSP_VAR, "XTERM 256 COLORS", MSSP_VAL, 1);
strcat(buf, tmp);
sprintf(tmp, "%c%s%c%d" "%c%s%c%d" "%c%s%c%d" "%c%s%c%d",
MSSP_VAR, "PAY TO PLAY", MSSP_VAL, 0,
MSSP_VAR, "PAY FOR PERKS", MSSP_VAL, 0,
MSSP_VAR, "HIRING BUILDERS", MSSP_VAL, 0,
MSSP_VAR, "HIRING CODERS", MSSP_VAL, 0);
strcat(buf, tmp);
sprintf(tmp, "%c%c", IAC, SE);
strcat(buf, tmp);
log_printf("strlen: %d", strlen(buf));
write_to_descriptor(d, buf, 0);
return 3;
}
— !mssp-response-begin
version: 1.0
name : BubbaMud
status :
state : Live
uptime : 34d:13h:26m
players: 3
who :
- name: Inky
desc: blah blah blah
- name: Pinky
desc: blah blah blah
- name: Stinky
desc: blah blah blah
motd : >
Double experience for smurfs!
Triple experience for clowns!
description:
genre : Fantasy
subgenre : Cartoon Fantasy
gameplay : Hack-n-Slash
system : Custom
races : 8
classes : 4
levels : 50
skills : 129
language : English
min-age : 16
pay-to-play : false
pay-for-perks: false
server:
location : Bolivia
hostname : bubba.com
address : 204.123.20.117
port : 4321
website : http://bubba.com
icon : http://bubba.com/icon.gif
contact : pumpkin@bubba.com
created : 1999
codebase : BubbaMud 1.3
ancestor : BobMud
hiring builders: true
hiring coders : false
statistics:
worlds : 1
areas : 43
rooms : 3621
mobiles : 2310
items : 1965
programs : 0
scripts : 157
helpfiles: 351
reset : 99
support:
ansi : true
mccp : true
mcp : false
msp : false
mxp : false
pueblo : false
vt100 : false
xterm256: false
comments: >
Friendly and helpful players.
Daily staff-run quests.
— !mssp-response-end
void printf_descriptor(DESCRIPTION_DATA* d, const char* fmt, …) {
/* formats and appends to the descriptor's output buffer
after doing IAC byte escaping for solid TELNET compliance.
if your MUD doesn't have a function like this, add one,
because your MUD sucks donkey nuts without it. */
}
void printf_descriptor_noescape(DESCRIPTION_DATA* d, const char* fmt, …) {
/* same as above without the IAC escaping */
}
void send_mssp_string(DESCRIPTION_DATA* d, const char* key, const char* value) {
printf_descriptor(d, "%c%s%c%s", VAR, key, VALUE, value);
}
void send_mssp_int(DESCRIPTION_DATA* d, const char* key, int value) {
printf_descriptor(d, "%c%s%c%s", VAR, key, VALUE, value);
}
int process_do_mssp( DESCRIPTOR_DATA *d, unsigned char *src, int srclen )
{
printf_descriptor_noescape(d, "%c%c%c", IAC, SB, TELOPT_MSSP);
send_mssp_int ("PLAYERS", mud->total_plr);
send_mssp_string ("CODEBASE", "ActuallyReadableMud 0.5");
/* etc */
printf_descriptor_noescape(d, "%c%c", IAC, SE);
}
void printf_descriptor(DESCRIPTION_DATA* d, const char* fmt, …) {
/* formats and appends to the descriptor's output buffer
after doing IAC byte escaping for solid TELNET compliance.
if your MUD doesn't have a function like this, add one,
because your MUD sucks donkey nuts without it. */
}
void printf_descriptor_noescape(DESCRIPTION_DATA* d, const char* fmt, …) {
/* same as above without the IAC escaping */
}
void send_mssp_int(DESCRIPTION_DATA* d, const char* key, int value) {
printf_descriptor(d, "%c%s%c%s", VAR, key, VALUE, value);
}
void send_mssp_int(DESCRIPTION_DATA* d, const char* key, int value) {
printf_descriptor(d, "%c%s%c%d", VAR, key, VALUE, value);
}
Current specs:
Current point of discussion:
How to negotiate an open skill system?