Im trying to use the smaug mssp snippet and add it to our mud, however Ive run into a couple errors that I havent been able to figure out….
protocols.c: In function `mssp_reply': protocols.c:2590: `va_list' undeclared (first use in this function) protocols.c:2590: (Each undeclared identifier is reported only once protocols.c:2590: for each function it appears in.) protocols.c:2590: syntax error before "args" protocols.c:2603: `args' undeclared (first use in this function) protocols.c: In function `write_to_descriptor_printf': protocols.c:2698: `va_list' undeclared (first use in this function) protocols.c:2698: syntax error before "args" protocols.c:2700: `args' undeclared (first use in this function)
Im slowly working my way through the other stuff. We use diku gamma and safe to say there is a lot of stuff in this snippet that we have not yet added to our codebase such as all the freads…
I am pretty close to having the plain text version implemented.
Is there a final document listing the variables wanted for this or is it continually evolving still? The tintin page did not have half of the ones the snippet did…
Id like to say thanks to the smaug team for the mssp snippet, it helped immensely! If anyone runs a DIKU mud and needs help just send me an email and I can send the changed code out or if the people here are interested I could add it to the snippets page?
The plan is to have a set of core variables, with each mud directory defining a list of extended variables they support, which I'll link from my mssp specification in the 'Extensions' sections of the link section.
The mud directories in turn need to figure out how to keep their variable lists compatible. I'll probably update the variable list once there's a conclusive list of extended variables that has wide acceptance.
As a side note, MTH was written to be compatible with Merc. Given Sloth already has a telnet handler it should be very easy to add MSSP telnet support by using MTH's MSSP output generator (process_do_mssp() in telopt.c) and using whatever system Sloth currently has to negotiate MSSP support, which is almost identical to MCCP.
I added the handling back when I got into the mxp, mccp, etc kick. I actually ended up adding both the plain text and telopt versions just in case something changes…
The smaug snippet allows for easy handling of MSSP variables ingame, so I ended up using that part of the code for that aspect of the protocol and I send the information through the telnet handler.
Its up and running if anyone wants to see if the information is correct at slothmud.org 6101
Thanks for all the help, especially to Scandum for the help with debugging.
protocols.c: In function `mssp_reply':
protocols.c:2590: `va_list' undeclared (first use in this function)
protocols.c:2590: (Each undeclared identifier is reported only once
protocols.c:2590: for each function it appears in.)
protocols.c:2590: syntax error before "args"
protocols.c:2603: `args' undeclared (first use in this function)
protocols.c: In function `write_to_descriptor_printf':
protocols.c:2698: `va_list' undeclared (first use in this function)
protocols.c:2698: syntax error before "args"
protocols.c:2700: `args' undeclared (first use in this function)
void mssp_reply( DESCRIPTOR_DATA * d, const char *var, const char *fmt, … )
{
char buf[MAX_STRING_LENGTH];
line 2590 va_list args;
if( !d )
{
bug( "%s: NULL d", __FUNCTION__ );
return;
}
if( !var || var[0] == '\0' )
{
bug( "%s: NULL var", __FUNCTION__ );
return;
}
line 2603 va_start( args, fmt );
vsprintf( buf, fmt, args );
va_end( args );
write_to_descriptor_printf( d, "%s\t%s\r\n", var, buf );
}
void write_to_descriptor_printf( DESCRIPTOR_DATA * desc, const char *fmt, … )
{
char buf[MAX_STRING_LENGTH * 2];
line 2698 va_list args;
line 2700 va_start( args, fmt );
vsprintf( buf, fmt, args );
va_end( args );
write_to_descriptormssp( desc, buf, strlen( buf ) );
}
Any help would be greatly appreciated…
Splork