Module: ngircd.git Branch: master Commit: 8fa92f0a24bb97a972ef82b8fa057d737c9f55b7 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=8fa92...
Author: Alexander Barton alex@barton.de Date: Sun Dec 4 22:30:32 2011 +0100
Suppress 'Can't create pre-defined channel: invalid name: ""' messages
Skip predefined channel structures that have configured no name, like the "--configtest" does.
---
src/ngircd/channel.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/ngircd/channel.c b/src/ngircd/channel.c index a36131c..74c97a0 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; }