#include "portab.h"
-static char UNUSED id[] = "$Id: irc-info.c,v 1.14 2003/01/01 13:30:35 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>
#include <string.h>
#include "ngircd.h"
+#include "cvs-version.h"
#include "conn-func.h"
#include "conn-zip.h"
#include "client.h"
}
t = time( NULL );
- (VOID)strftime( t_str, 60, "%A %B %d %Y -- %H:%M %z", localtime( &t ));
+ (VOID)strftime( t_str, 60, "%A %B %d %Y -- %H:%M %Z", localtime( &t ));
return IRC_WriteStrClient( from, RPL_TIME_MSG, Client_ID( from ), Client_ID( Client_ThisServer( )), t_str );
} /* IRC_TIME */
IRC_VERSION( CLIENT *Client, REQUEST *Req )
{
CLIENT *target, *prefix;
+#ifdef CVSDATE
+ CHAR ver[12];
+#endif
assert( Client != NULL );
assert( Req != NULL );
}
/* mit Versionsinfo antworten */
- return IRC_WriteStrClient( Client, RPL_VERSION_MSG, Client_ID( prefix ), PACKAGE, VERSION, NGIRCd_DebugLevel, Conf_ServerName, NGIRCd_VersionAddition( ));
+#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 */