1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-12-12 09:50:29 +00:00

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

This commit is contained in:
Alexander Barton 2020-03-29 22:30:47 +02:00
parent ba3b22b851
commit 3aa1d880fe

View File

@ -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 <key>\"!",
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 <limit>\"!",
File, Line, Var);
return;
}
if (strcasecmp(Var, "KeyFile") == 0) {