mirror of
https://github.com/osmarks/ngircd.git
synced 2024-10-28 12:56:18 +00:00
Don't read MOTD file twice
The MOTD file is read in Read_Config(), so don't read it when handling the "MotdFile" configuration variable. Instead make sure that it is initialized properly when (re-)reading the configuration.
This commit is contained in:
parent
c98e794b38
commit
914d6a26d8
@ -641,6 +641,9 @@ Set_Defaults(bool InitServers)
|
|||||||
for (i = 0; i < MAX_SERVERS;
|
for (i = 0; i < MAX_SERVERS;
|
||||||
Init_Server_Struct(&Conf_Server[i++]));
|
Init_Server_Struct(&Conf_Server[i++]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Free MOTD; this is important when reloading the configuration */
|
||||||
|
array_free(&Conf_Motd);
|
||||||
} /* Set_Defaults */
|
} /* Set_Defaults */
|
||||||
|
|
||||||
|
|
||||||
@ -1016,7 +1019,6 @@ Handle_GLOBAL( int Line, char *Var, char *Arg )
|
|||||||
len = strlcpy( Conf_MotdFile, Arg, sizeof( Conf_MotdFile ));
|
len = strlcpy( Conf_MotdFile, Arg, sizeof( Conf_MotdFile ));
|
||||||
if (len >= sizeof( Conf_MotdFile ))
|
if (len >= sizeof( Conf_MotdFile ))
|
||||||
Config_Error_TooLong( Line, Var );
|
Config_Error_TooLong( Line, Var );
|
||||||
Read_Motd(Arg);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if( strcasecmp( Var, "MotdPhrase" ) == 0 ) {
|
if( strcasecmp( Var, "MotdPhrase" ) == 0 ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user