- Channel_InitPredefined() prueft nun, ob ein Channel bereits existiert.
authorAlexander Barton <alex@barton.de>
Fri, 22 Nov 2002 17:57:15 +0000 (17:57 +0000)
committerAlexander Barton <alex@barton.de>
Fri, 22 Nov 2002 17:57:15 +0000 (17:57 +0000)
src/ngircd/channel.c

index dc06042cc1b5ff5fefe9c28e1f692fef44b4be74..c30d4d555189b67a0bc895f8c69e9d929e0b8522 100644 (file)
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: channel.c,v 1.33 2002/10/09 16:53:02 alex Exp $
+ * $Id: channel.c,v 1.34 2002/11/22 17:57:15 alex Exp $
  *
  * channel.c: Management der Channels
  */
@@ -88,6 +88,14 @@ Channel_InitPredefined( VOID )
                        Log( LOG_ERR, "Can't create pre-defined channel: invalid name: \"%s\"!", Conf_Channel[i].name );
                        continue;
                }
+
+               /* Gibt es den Channel bereits? */
+               chan = Channel_Search( Conf_Channel[i].name );
+               if( chan )
+               {
+                       Log( LOG_INFO, "Can't create pre-defined channel \"%s\": name already in use.", Conf_Channel[i].name );
+                       continue;
+               }
                
                /* Channel anlegen */
                chan = Channel_Create( Conf_Channel[i].name );