1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-12-13 18:30:27 +00:00

Suppress 'Can't create pre-defined channel: invalid name: ""' messages

Skip predefined channel structures that have configured no name,
like the "--configtest" does.
This commit is contained in:
Alexander Barton 2011-12-04 22:30:32 +01:00
parent 8e193df973
commit 8fa92f0a24

View File

@ -110,8 +110,11 @@ Channel_InitPredefined( void )
assert(channel_count == 0 || conf_chan != NULL); assert(channel_count == 0 || conf_chan != NULL);
for (i = 0; i < channel_count; i++, conf_chan++) { for (i = 0; i < channel_count; i++, conf_chan++) {
if (!conf_chan->name[0] || !Channel_IsValidName(conf_chan->name)) { if (!conf_chan->name[0])
Log(LOG_ERR, "Can't create pre-defined channel: invalid name: \"%s\"", continue;
if (!Channel_IsValidName(conf_chan->name)) {
Log(LOG_ERR,
"Can't create pre-defined channel: invalid name: \"%s\"",
conf_chan->name); conf_chan->name);
continue; continue;
} }