]> granicus.if.org Git - ngircd/commitdiff
Suppress 'Can't create pre-defined channel: invalid name: ""' messages
authorAlexander Barton <alex@barton.de>
Sun, 4 Dec 2011 21:30:32 +0000 (22:30 +0100)
committerAlexander Barton <alex@barton.de>
Sun, 4 Dec 2011 21:35:20 +0000 (22:35 +0100)
Skip predefined channel structures that have configured no name,
like the "--configtest" does.

src/ngircd/channel.c

index a36131c0031f3c99e3bf2cd0ad359f622d932c4d..74c97a0a8dc41abe99c30981d0f840402f040df9 100644 (file)
@@ -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;
                }