1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-12-15 11:20:26 +00:00

Enhanced VERSION command when using debug builds. [from HEAD]

This commit is contained in:
Alexander Barton 2003-07-18 20:49:35 +00:00
parent c3c4f32145
commit ad22b3087f

View File

@ -14,7 +14,7 @@
#include "portab.h"
static char UNUSED id[] = "$Id: irc-info.c,v 1.16 2003/04/21 10:54:30 alex Exp $";
static char UNUSED id[] = "$Id: irc-info.c,v 1.16.2.1 2003/07/18 20:49:35 alex Exp $";
#include "imp.h"
#include <assert.h>
@ -23,6 +23,7 @@ static char UNUSED id[] = "$Id: irc-info.c,v 1.16 2003/04/21 10:54:30 alex Exp $
#include <string.h>
#include "ngircd.h"
#include "cvs-version.h"
#include "conn-func.h"
#include "conn-zip.h"
#include "client.h"
@ -486,6 +487,9 @@ GLOBAL BOOLEAN
IRC_VERSION( CLIENT *Client, REQUEST *Req )
{
CLIENT *target, *prefix;
#ifdef CVSDATE
CHAR ver[12];
#endif
assert( Client != NULL );
assert( Req != NULL );
@ -513,7 +517,14 @@ IRC_VERSION( CLIENT *Client, REQUEST *Req )
}
/* mit Versionsinfo antworten */
#ifdef CVSDATE
strlcpy( ver, CVSDATE, sizeof( ver ));
strncpy( ver + 4, ver + 5, 2 );
strncpy( ver + 6, ver + 8, 3 );
return IRC_WriteStrClient( Client, RPL_VERSION_MSG, Client_ID( prefix ), PACKAGE_NAME, ver, NGIRCd_DebugLevel, Conf_ServerName, NGIRCd_VersionAddition( ));
#else
return IRC_WriteStrClient( Client, RPL_VERSION_MSG, Client_ID( prefix ), PACKAGE_NAME, PACKAGE_VERSION, NGIRCd_DebugLevel, Conf_ServerName, NGIRCd_VersionAddition( ));
#endif
} /* IRC_VERSION */