diff options
| author | Alexander Barton <alex@barton.de> | 2003-06-06 20:46:11 +0000 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2003-06-06 20:46:11 +0000 |
| commit | 260b8e5f364ef7d2c6a40741dd361c99daecde9a (patch) | |
| tree | 6a393fe5ed63b96832360f2d7c6395abe75cb3e9 | |
| parent | 9a009b24dad03af6c0d30172f542663cd8d11bcc (diff) | |
| download | ngircd-260b8e5f364ef7d2c6a40741dd361c99daecde9a.tar.gz ngircd-260b8e5f364ef7d2c6a40741dd361c99daecde9a.zip | |
VERSION shows the CVS date if apropriate now.
| -rw-r--r-- | src/ngircd/irc-info.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/ngircd/irc-info.c b/src/ngircd/irc-info.c index a11f9dad..3bc6904f 100644 --- a/src/ngircd/irc-info.c +++ b/src/ngircd/irc-info.c @@ -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.17 2003/06/06 20:46:11 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 */ |