From: Alexander Barton Date: Sun, 4 Dec 2011 21:30:32 +0000 (+0100) Subject: Suppress 'Can't create pre-defined channel: invalid name: ""' messages X-Git-Tag: rel-19-rc1~115 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8fa92f0a24bb97a972ef82b8fa057d737c9f55b7;p=ngircd Suppress 'Can't create pre-defined channel: invalid name: ""' messages Skip predefined channel structures that have configured no name, like the "--configtest" does. --- diff --git a/src/ngircd/channel.c b/src/ngircd/channel.c index a36131c0..74c97a0a 100644 --- a/src/ngircd/channel.c +++ b/src/ngircd/channel.c @@ -110,9 +110,12 @@ Channel_InitPredefined( void ) assert(channel_count == 0 || conf_chan != NULL); for (i = 0; i < channel_count; i++, conf_chan++) { - if (!conf_chan->name[0] || !Channel_IsValidName(conf_chan->name)) { - Log(LOG_ERR, "Can't create pre-defined channel: invalid name: \"%s\"", - conf_chan->name); + if (!conf_chan->name[0]) + continue; + if (!Channel_IsValidName(conf_chan->name)) { + Log(LOG_ERR, + "Can't create pre-defined channel: invalid name: \"%s\"", + conf_chan->name); continue; }