mirror of
				https://github.com/osmarks/ngircd.git
				synced 2025-10-31 05:52:59 +00:00 
			
		
		
		
	Rename ClientHost to CloakHost, and ClientUserNick to CloakUserToNick
This commit is contained in:
		| @@ -154,11 +154,11 @@ | ||||
| 	# maximum nick name length! | ||||
| 	;MaxNickLength = 9 | ||||
|  | ||||
| 	# Set this hostname for every client instead of the real one | ||||
| 	;ClientHost = irc.example.net | ||||
| 	# Set this hostname for every client instead of the real one. | ||||
| 	;CloakHost = irc.example.net | ||||
|  | ||||
| 	# Set every clients' user name to their nick name | ||||
| 	;ClientUserNick = yes | ||||
| 	;CloakUserToNick = yes | ||||
|  | ||||
| [Features] | ||||
| 	# Do any DNS lookups when a client connects to the server. | ||||
|   | ||||
| @@ -237,11 +237,11 @@ Maximum length of an user nick name (Default: 9, as in RFC 2812). Please | ||||
| note that all servers in an IRC network MUST use the same maximum nick name | ||||
| length! | ||||
| .TP | ||||
| \fBClientHost\fR | ||||
| \fBCloakHost\fR | ||||
| Set this hostname for every client instead of the real one. Default: empty, | ||||
| don't change. | ||||
| .TP | ||||
| \fBClientUserNick\fR | ||||
| \fBCloakUserToNick\fR | ||||
| Set every clients' user name to their nick name and hide the one supplied | ||||
| by the IRC client. Default: no. | ||||
| .SH [OPERATOR] | ||||
|   | ||||
| @@ -319,8 +319,8 @@ Client_SetHostname( CLIENT *Client, const char *Hostname ) | ||||
| 	assert( Client != NULL ); | ||||
| 	assert( Hostname != NULL ); | ||||
|  | ||||
| 	if (strlen(Conf_ClientHost)) { | ||||
| 		strlcpy( Client->host, Conf_ClientHost, sizeof( Client->host )); | ||||
| 	if (strlen(Conf_CloakHost)) { | ||||
| 		strlcpy( Client->host, Conf_CloakHost, sizeof( Client->host )); | ||||
| 	} else { | ||||
| 		strlcpy( Client->host, Hostname, sizeof( Client->host )); | ||||
| 	} | ||||
| @@ -335,7 +335,7 @@ Client_SetID( CLIENT *Client, const char *ID ) | ||||
| 	 | ||||
| 	strlcpy( Client->id, ID, sizeof( Client->id )); | ||||
|  | ||||
| 	if (Conf_ClientUserNick) | ||||
| 	if (Conf_CloakUserToNick) | ||||
| 		strlcpy( Client->user, ID, sizeof( Client->user )); | ||||
|  | ||||
| 	/* Hash */ | ||||
| @@ -351,7 +351,7 @@ Client_SetUser( CLIENT *Client, const char *User, bool Idented ) | ||||
| 	assert( Client != NULL ); | ||||
| 	assert( User != NULL ); | ||||
|  | ||||
| 	if (Conf_ClientUserNick) return; | ||||
| 	if (Conf_CloakUserToNick) return; | ||||
|  | ||||
| 	if (Idented) { | ||||
| 		strlcpy(Client->user, User, sizeof(Client->user)); | ||||
|   | ||||
| @@ -352,8 +352,8 @@ Conf_Test( void ) | ||||
| 	printf("  MaxConnectionsIP = %d\n", Conf_MaxConnectionsIP); | ||||
| 	printf("  MaxJoins = %d\n", Conf_MaxJoins > 0 ? Conf_MaxJoins : -1); | ||||
| 	printf("  MaxNickLength = %u\n", Conf_MaxNickLength - 1); | ||||
| 	printf("  ClientHost = %s\n", Conf_ClientHost); | ||||
| 	printf("  ClientUserNick = %s\n\n", yesno_to_str(Conf_ClientUserNick)); | ||||
| 	printf("  CloakHost = %s\n", Conf_CloakHost); | ||||
| 	printf("  CloakUserToNick = %s\n\n", yesno_to_str(Conf_CloakUserToNick)); | ||||
|  | ||||
| 	puts("[FEATURES]"); | ||||
| 	printf("  DNS = %s\n", yesno_to_str(Conf_DNS)); | ||||
| @@ -592,8 +592,6 @@ Set_Defaults(bool InitServers) | ||||
| 	int i; | ||||
|  | ||||
| 	strcpy(Conf_ServerName, ""); | ||||
| 	strcpy(Conf_ClientHost, ""); | ||||
| 	Conf_ClientUserNick = false; | ||||
| 	snprintf(Conf_ServerInfo, sizeof Conf_ServerInfo, "%s %s", | ||||
| 		 PACKAGE_NAME, PACKAGE_VERSION); | ||||
| 	strcpy(Conf_ServerPwd, ""); | ||||
| @@ -633,6 +631,9 @@ Set_Defaults(bool InitServers) | ||||
| 	Conf_MaxJoins = 10; | ||||
| 	Conf_MaxNickLength = CLIENT_NICK_LEN_DEFAULT; | ||||
|  | ||||
| 	strcpy(Conf_CloakHost, ""); | ||||
| 	Conf_CloakUserToNick = false; | ||||
|  | ||||
| #ifdef SYSLOG | ||||
| #ifdef LOG_LOCAL5 | ||||
| 	Conf_SyslogFacility = LOG_LOCAL5; | ||||
| @@ -974,16 +975,16 @@ Handle_GLOBAL( int Line, char *Var, char *Arg ) | ||||
| 			Config_Error_TooLong( Line, Var ); | ||||
| 		return; | ||||
| 	} | ||||
| 	if( strcasecmp( Var, "ClientHost" ) == 0 ) { | ||||
| 	if( strcasecmp( Var, "CloakHost" ) == 0 ) { | ||||
| 		/* Client hostname */ | ||||
| 		len = strlcpy( Conf_ClientHost, Arg, sizeof( Conf_ClientHost )); | ||||
| 		if (len >= sizeof( Conf_ClientHost )) | ||||
| 		len = strlcpy( Conf_CloakHost, Arg, sizeof( Conf_CloakHost )); | ||||
| 		if (len >= sizeof( Conf_CloakHost )) | ||||
| 			Config_Error_TooLong( Line, Var ); | ||||
| 		return; | ||||
| 	} | ||||
| 	if( strcasecmp( Var, "ClientUserNick" ) == 0 ) { | ||||
| 	if( strcasecmp( Var, "CloakUserToNick" ) == 0 ) { | ||||
| 		/* Use client nick name as user name */ | ||||
| 		Conf_ClientUserNick = Check_ArgIsTrue( Arg ); | ||||
| 		Conf_CloakUserToNick = Check_ArgIsTrue( Arg ); | ||||
| 		return; | ||||
| 	} | ||||
| 	if( strcasecmp( Var, "Info" ) == 0 ) { | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| /* | ||||
|  * ngIRCd -- The Next Generation IRC Daemon | ||||
|  * Copyright (c)2001-2010 Alexander Barton (alex@barton.de) | ||||
|  * Copyright (c)2001-2011 Alexander Barton (alex@barton.de) and Contributors. | ||||
|  * | ||||
|  * 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 | ||||
| @@ -97,10 +97,6 @@ struct Conf_Channel { | ||||
| /** Name (ID, "nick") of this server */ | ||||
| GLOBAL char Conf_ServerName[CLIENT_ID_LEN]; | ||||
|  | ||||
| /** Hostname of the clients */ | ||||
| GLOBAL char Conf_ClientHost[CLIENT_ID_LEN]; | ||||
| GLOBAL bool Conf_ClientUserNick; | ||||
|  | ||||
| /** Server info text */ | ||||
| GLOBAL char Conf_ServerInfo[CLIENT_INFO_LEN]; | ||||
|  | ||||
| @@ -167,6 +163,12 @@ GLOBAL bool Conf_OperServerMode; | ||||
| /** Flag indicating if remote IRC operators are allowed to manage this server */ | ||||
| GLOBAL bool Conf_AllowRemoteOper; | ||||
|  | ||||
| /** Cloaked hostname of the clients */ | ||||
| GLOBAL char Conf_CloakHost[CLIENT_ID_LEN]; | ||||
|  | ||||
| /** Use nick name as user name? */ | ||||
| GLOBAL bool Conf_CloakUserToNick; | ||||
|  | ||||
| /** Enable all DNS functions? */ | ||||
| GLOBAL bool Conf_DNS; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Alexander Barton
					Alexander Barton