mirror of
				https://github.com/osmarks/ngircd.git
				synced 2025-10-31 14:02:59 +00:00 
			
		
		
		
	Get rid of cvs-version.* and CVSDATE definition.
This commit is contained in:
		| @@ -36,7 +36,7 @@ noinst_HEADERS = ngircd.h array.h channel.h client.h conf.h conn.h conn-func.h \ | |||||||
| 	defines.h messages.h | 	defines.h messages.h | ||||||
|  |  | ||||||
| clean-local: | clean-local: | ||||||
| 	rm -f check-version check-help lint.out cvs-version.* | 	rm -f check-version check-help lint.out | ||||||
|  |  | ||||||
| maintainer-clean-local: | maintainer-clean-local: | ||||||
| 	rm -f Makefile Makefile.in | 	rm -f Makefile Makefile.in | ||||||
| @@ -77,23 +77,6 @@ lint: | |||||||
| 	 || echo "Result: no warnings found."; \ | 	 || echo "Result: no warnings found."; \ | ||||||
| 	echo; [ $$warnings -gt 0 ] && exit 1 | 	echo; [ $$warnings -gt 0 ] && exit 1 | ||||||
|  |  | ||||||
| ngircd.c: cvs-version.h |  | ||||||
|  |  | ||||||
| irc-login.c: cvs-version.h |  | ||||||
|  |  | ||||||
| irc-info.c: cvs-version.h |  | ||||||
|  |  | ||||||
| cvs-version.h: cvs-date |  | ||||||
|  |  | ||||||
| cvs-date: |  | ||||||
| 	grep VERSION ../config.h | grep "CVS" \ |  | ||||||
| 	 && echo "#define CVSDATE \"$$( grep "\$$Id" $(srcdir)/*.c \ |  | ||||||
| 	    | $(AWK) "{ print \$$9 }" | sort | tail -1 \ |  | ||||||
| 	    | sed -e "s/\//-/g" )\"" > cvs-version.new \ |  | ||||||
| 	 || echo "" > cvs-version.new |  | ||||||
| 	diff cvs-version.h cvs-version.new 2>/dev/null \ |  | ||||||
| 	 || cp cvs-version.new cvs-version.h |  | ||||||
|  |  | ||||||
| TESTS = check-version check-help | TESTS = check-version check-help | ||||||
|  |  | ||||||
| # -eof- | # -eof- | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  * ngIRCd -- The Next Generation IRC Daemon |  * ngIRCd -- The Next Generation IRC Daemon | ||||||
|  * Copyright (c)2001-2005 Alexander Barton (alex@barton.de) |  * Copyright (c)2001-2008 Alexander Barton (alex@barton.de) | ||||||
|  * |  * | ||||||
|  * This program is free software; you can redistribute it and/or modify |  * This program is free software; you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  * it under the terms of the GNU General Public License as published by | ||||||
| @@ -14,8 +14,6 @@ | |||||||
|  |  | ||||||
| #include "portab.h" | #include "portab.h" | ||||||
|  |  | ||||||
| static char UNUSED id[] = "$Id: irc-info.c,v 1.44 2008/02/17 13:26:42 alex Exp $"; |  | ||||||
|  |  | ||||||
| #include "imp.h" | #include "imp.h" | ||||||
| #include <assert.h> | #include <assert.h> | ||||||
| #include <errno.h> | #include <errno.h> | ||||||
| @@ -25,7 +23,6 @@ static char UNUSED id[] = "$Id: irc-info.c,v 1.44 2008/02/17 13:26:42 alex Exp $ | |||||||
| #include <strings.h> | #include <strings.h> | ||||||
|  |  | ||||||
| #include "ngircd.h" | #include "ngircd.h" | ||||||
| #include "cvs-version.h" |  | ||||||
| #include "conn-func.h" | #include "conn-func.h" | ||||||
| #include "conn-zip.h" | #include "conn-zip.h" | ||||||
| #include "client.h" | #include "client.h" | ||||||
| @@ -640,9 +637,6 @@ GLOBAL bool | |||||||
| IRC_VERSION( CLIENT *Client, REQUEST *Req ) | IRC_VERSION( CLIENT *Client, REQUEST *Req ) | ||||||
| { | { | ||||||
| 	CLIENT *target, *prefix; | 	CLIENT *target, *prefix; | ||||||
| #ifdef CVSDATE |  | ||||||
| 	char ver[12], vertxt[30]; |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
| 	assert( Client != NULL ); | 	assert( Client != NULL ); | ||||||
| 	assert( Req != NULL ); | 	assert( Req != NULL ); | ||||||
| @@ -669,21 +663,15 @@ IRC_VERSION( CLIENT *Client, REQUEST *Req ) | |||||||
| 		return CONNECTED; | 		return CONNECTED; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/* mit Versionsinfo antworten */ | 	/* send version information */ | ||||||
| 	IRC_SetPenalty( Client, 1 ); | 	IRC_SetPenalty(Client, 1); | ||||||
| #ifdef CVSDATE | 	return IRC_WriteStrClient(Client, RPL_VERSION_MSG, Client_ID(prefix), | ||||||
| 	strlcpy( ver, CVSDATE, sizeof( ver )); | 				  PACKAGE_NAME, PACKAGE_VERSION, | ||||||
| 	strncpy( ver + 4, ver + 5, 2 ); | 				  NGIRCd_DebugLevel, Conf_ServerName, | ||||||
| 	strncpy( ver + 6, ver + 8, 3 ); | 				  NGIRCd_VersionAddition); | ||||||
| 	snprintf( vertxt, sizeof( vertxt ), "%s(%s)", PACKAGE_VERSION, ver ); |  | ||||||
| 	return IRC_WriteStrClient( Client, RPL_VERSION_MSG, Client_ID( prefix ), PACKAGE_NAME, vertxt, 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 */ | } /* IRC_VERSION */ | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| static bool | static bool | ||||||
| write_whoreply(CLIENT *Client, CLIENT *c, const char *channelname, const char *flags) | write_whoreply(CLIENT *Client, CLIENT *c, const char *channelname, const char *flags) | ||||||
| { | { | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  * ngIRCd -- The Next Generation IRC Daemon |  * ngIRCd -- The Next Generation IRC Daemon | ||||||
|  * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de) |  * Copyright (c)2001-2008 Alexander Barton (alex@barton.de) | ||||||
|  * |  * | ||||||
|  * This program is free software; you can redistribute it and/or modify |  * This program is free software; you can redistribute it and/or modify | ||||||
|  * it under the terms of the GNU General Public License as published by |  * it under the terms of the GNU General Public License as published by | ||||||
| @@ -14,8 +14,6 @@ | |||||||
|  |  | ||||||
| #include "portab.h" | #include "portab.h" | ||||||
|  |  | ||||||
| static char UNUSED id[] = "$Id: irc-login.c,v 1.55 2008/02/05 11:46:55 fw Exp $"; |  | ||||||
|  |  | ||||||
| #include "imp.h" | #include "imp.h" | ||||||
| #include <assert.h> | #include <assert.h> | ||||||
| #include <stdio.h> | #include <stdio.h> | ||||||
| @@ -35,7 +33,6 @@ static char UNUSED id[] = "$Id: irc-login.c,v 1.55 2008/02/05 11:46:55 fw Exp $" | |||||||
| #include "irc.h" | #include "irc.h" | ||||||
| #include "irc-info.h" | #include "irc-info.h" | ||||||
| #include "irc-write.h" | #include "irc-write.h" | ||||||
| #include "cvs-version.h" |  | ||||||
|  |  | ||||||
| #include "exp.h" | #include "exp.h" | ||||||
| #include "irc-login.h" | #include "irc-login.h" | ||||||
| @@ -573,61 +570,60 @@ IRC_PONG(CLIENT *Client, REQUEST *Req) | |||||||
|  |  | ||||||
|  |  | ||||||
| static bool | static bool | ||||||
| Hello_User( CLIENT *Client ) | Hello_User(CLIENT * Client) | ||||||
| { | { | ||||||
| #ifdef CVSDATE | 	assert(Client != NULL); | ||||||
| 	char ver[12], vertxt[30]; |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
| 	assert( Client != NULL ); |  | ||||||
|  |  | ||||||
| 	/* Check password ... */ | 	/* Check password ... */ | ||||||
| 	if( strcmp( Client_Password( Client ), Conf_ServerPwd ) != 0 ) | 	if (strcmp(Client_Password(Client), Conf_ServerPwd) != 0) { | ||||||
| 	{ |  | ||||||
| 		/* Bad password! */ | 		/* Bad password! */ | ||||||
| 		Log( LOG_ERR, "User \"%s\" rejected (connection %d): Bad password!", Client_Mask( Client ), Client_Conn( Client )); | 		Log(LOG_ERR, | ||||||
| 		Conn_Close( Client_Conn( Client ), NULL, "Bad password", true); | 		    "User \"%s\" rejected (connection %d): Bad password!", | ||||||
|  | 		    Client_Mask(Client), Client_Conn(Client)); | ||||||
|  | 		Conn_Close(Client_Conn(Client), NULL, "Bad password", true); | ||||||
| 		return DISCONNECTED; | 		return DISCONNECTED; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	Log( LOG_NOTICE, "User \"%s\" registered (connection %d).", Client_Mask( Client ), Client_Conn( Client )); | 	Log(LOG_NOTICE, "User \"%s\" registered (connection %d).", | ||||||
|  | 	    Client_Mask(Client), Client_Conn(Client)); | ||||||
|  |  | ||||||
| 	/* Inform other servers */ | 	/* Inform other servers */ | ||||||
| 	IRC_WriteStrServers( NULL, "NICK %s 1 %s %s 1 +%s :%s", Client_ID( Client ), Client_User( Client ), Client_Hostname( Client ), Client_Modes( Client ), Client_Info( Client )); | 	IRC_WriteStrServers(NULL, "NICK %s 1 %s %s 1 +%s :%s", | ||||||
|  | 			    Client_ID(Client), Client_User(Client), | ||||||
|  | 			    Client_Hostname(Client), Client_Modes(Client), | ||||||
|  | 			    Client_Info(Client)); | ||||||
|  |  | ||||||
| 	/* Welcome :-) */ | 	if (!IRC_WriteStrClient | ||||||
| 	if( ! IRC_WriteStrClient( Client, RPL_WELCOME_MSG, Client_ID( Client ), Client_Mask( Client ))) return false; | 	    (Client, RPL_WELCOME_MSG, Client_ID(Client), Client_Mask(Client))) | ||||||
|  | 		return false; | ||||||
| 	/* Version and system type */ | 	if (!IRC_WriteStrClient | ||||||
| #ifdef CVSDATE | 	    (Client, RPL_YOURHOST_MSG, Client_ID(Client), | ||||||
| 	strlcpy( ver, CVSDATE, sizeof( ver )); | 	     Client_ID(Client_ThisServer()), PACKAGE_VERSION, TARGET_CPU, | ||||||
| 	memmove( ver + 4, ver + 5, 2 ); | 	     TARGET_VENDOR, TARGET_OS)) | ||||||
| 	memmove( ver + 6, ver + 8, 3 ); | 		return false; | ||||||
| 	snprintf( vertxt, sizeof( vertxt ), "%s(%s)", PACKAGE_VERSION, ver ); | 	if (!IRC_WriteStrClient | ||||||
| 	if( ! IRC_WriteStrClient( Client, RPL_YOURHOST_MSG, Client_ID( Client ), Client_ID( Client_ThisServer( )), vertxt, TARGET_CPU, TARGET_VENDOR, TARGET_OS )) return false; | 	    (Client, RPL_CREATED_MSG, Client_ID(Client), NGIRCd_StartStr)) | ||||||
| #else | 		return false; | ||||||
| 	if( ! IRC_WriteStrClient( Client, RPL_YOURHOST_MSG, Client_ID( Client ), Client_ID( Client_ThisServer( )), PACKAGE_VERSION, TARGET_CPU, TARGET_VENDOR, TARGET_OS )) return false; | 	if (!IRC_WriteStrClient | ||||||
| #endif | 	    (Client, RPL_MYINFO_MSG, Client_ID(Client), | ||||||
|  | 	     Client_ID(Client_ThisServer()), PACKAGE_VERSION, USERMODES, | ||||||
| 	if( ! IRC_WriteStrClient( Client, RPL_CREATED_MSG, Client_ID( Client ), NGIRCd_StartStr )) return false; | 	     CHANMODES)) | ||||||
| #ifdef CVSDATE | 		return false; | ||||||
| 	if( ! IRC_WriteStrClient( Client, RPL_MYINFO_MSG, Client_ID( Client ), Client_ID( Client_ThisServer( )), vertxt, USERMODES, CHANMODES )) return false;	 |  | ||||||
| #else |  | ||||||
| 	if( ! IRC_WriteStrClient( Client, RPL_MYINFO_MSG, Client_ID( Client ), Client_ID( Client_ThisServer( )), PACKAGE_VERSION, USERMODES, CHANMODES )) return false; |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
| 	/* Features supported by this server (005 numeric, ISUPPORT), | 	/* Features supported by this server (005 numeric, ISUPPORT), | ||||||
| 	 * see <http://www.irc.org/tech_docs/005.html> for details. */ | 	 * see <http://www.irc.org/tech_docs/005.html> for details. */ | ||||||
| 	if (! IRC_Send_ISUPPORT(Client)) | 	if (!IRC_Send_ISUPPORT(Client)) | ||||||
| 		return DISCONNECTED; | 		return DISCONNECTED; | ||||||
|  |  | ||||||
| 	Client_SetType( Client, CLIENT_USER ); | 	Client_SetType(Client, CLIENT_USER); | ||||||
|  |  | ||||||
| 	if( ! IRC_Send_LUSERS( Client )) return DISCONNECTED; | 	if (!IRC_Send_LUSERS(Client)) | ||||||
| 	if( ! IRC_Show_MOTD( Client )) return DISCONNECTED; | 		return DISCONNECTED; | ||||||
|  | 	if (!IRC_Show_MOTD(Client)) | ||||||
|  | 		return DISCONNECTED; | ||||||
|  |  | ||||||
| 	/* Suspend the client for a second ... */ | 	/* Suspend the client for a second ... */ | ||||||
| 	IRC_SetPenalty( Client, 1 ); | 	IRC_SetPenalty(Client, 1); | ||||||
|  |  | ||||||
| 	return CONNECTED; | 	return CONNECTED; | ||||||
| } /* Hello_User */ | } /* Hello_User */ | ||||||
|   | |||||||
| @@ -40,7 +40,6 @@ | |||||||
| #include "client.h" | #include "client.h" | ||||||
| #include "channel.h" | #include "channel.h" | ||||||
| #include "conf.h" | #include "conf.h" | ||||||
| #include "cvs-version.h" |  | ||||||
| #include "lists.h" | #include "lists.h" | ||||||
| #include "log.h" | #include "log.h" | ||||||
| #include "parse.h" | #include "parse.h" | ||||||
| @@ -410,12 +409,9 @@ Fill_Version( void ) | |||||||
| 	strlcat( NGIRCd_VersionAddition, "/", sizeof( NGIRCd_VersionAddition )); | 	strlcat( NGIRCd_VersionAddition, "/", sizeof( NGIRCd_VersionAddition )); | ||||||
| 	strlcat( NGIRCd_VersionAddition, TARGET_OS, sizeof( NGIRCd_VersionAddition )); | 	strlcat( NGIRCd_VersionAddition, TARGET_OS, sizeof( NGIRCd_VersionAddition )); | ||||||
|  |  | ||||||
| #ifdef CVSDATE | 	snprintf(NGIRCd_Version, sizeof NGIRCd_Version, "%s %s-%s", | ||||||
| 	snprintf( NGIRCd_Version, sizeof NGIRCd_Version,"%s %s(%s)-%s", PACKAGE_NAME, PACKAGE_VERSION, CVSDATE, NGIRCd_VersionAddition); | 		 PACKAGE_NAME, PACKAGE_VERSION, NGIRCd_VersionAddition); | ||||||
| #else | 	} /* Fill_Version */ | ||||||
| 	snprintf( NGIRCd_Version, sizeof NGIRCd_Version, "%s %s-%s", PACKAGE_NAME, PACKAGE_VERSION, NGIRCd_VersionAddition); |  | ||||||
| #endif |  | ||||||
| } /* Fill_Version */ |  | ||||||
|  |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Alexander Barton
					Alexander Barton