repo: ngircd
action: commit
revision: 
path_from: 
revision_from: 3aa1d880fe824fd8a3e6ce1db3a66bd4ae56b6bc:
path_to: 
revision_to: 
git.thebackupbox.net
ngircd
git clone git://git.thebackupbox.net/ngircd
commit 3aa1d880fe824fd8a3e6ce1db3a66bd4ae56b6bc
Author: Alexander Barton 
Date:   Sun Mar 29 22:30:47 2020 +0200

    Add deprecation warnings for "Key" and "MaxUsers" in [Channel]

diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c
index 373ea6b1ed7bf6709038f84d3b08be11eefffa3b..
index ..02ed1f390c2ab45d8cb68b9090fdd1eb188e4adc 100644
--- a/src/ngircd/conf.c
+++ b/src/ngircd/conf.c
@@ -2177,6 +2177,9 @@ Handle_CHANNEL(const char *File, int Line, char *Var, char *Arg)
 		len = strlcpy(chan->key, Arg, sizeof(chan->key));
 		if (len >= sizeof(chan->key))
 			Config_Error_TooLong(File, Line, Var);
+		Config_Error(LOG_WARNING,
+			     "%s, line %d (section \"Channel\"): \"%s\" is deprecated here, use \"Modes = +k \"!",
+			     File, Line, Var);
 		return;
 	}
 	if( strcasecmp( Var, "MaxUsers" ) == 0 ) {
@@ -2184,6 +2187,9 @@ Handle_CHANNEL(const char *File, int Line, char *Var, char *Arg)
 		chan->maxusers = (unsigned long) atol(Arg);
 		if (!chan->maxusers && strcmp(Arg, "0"))
 			Config_Error_NaN(File, Line, Var);
+		Config_Error(LOG_WARNING,
+			     "%s, line %d (section \"Channel\"): \"%s\" is deprecated here, use \"Modes = +l \"!",
+			     File, Line, Var);
 		return;
 	}
 	if (strcasecmp(Var, "KeyFile") == 0) {

-----END OF PAGE-----