repo: ngircd
action: commit
revision: 
path_from: 
revision_from: 7233b72145360ff390613c2922437f1469e4cb32:
path_to: 
revision_to: 
git.thebackupbox.net
ngircd
git clone git://git.thebackupbox.net/ngircd
commit 7233b72145360ff390613c2922437f1469e4cb32
Author: Alexander Barton 
Date:   Fri Nov 22 17:57:15 2002 +0000

    - Channel_InitPredefined() prueft nun, ob ein Channel bereits existiert.

diff --git a/src/ngircd/channel.c b/src/ngircd/channel.c
index dc06042cc1b5ff5fefe9c28e1f692fef44b4be74..
index ..c30d4d555189b67a0bc895f8c69e9d929e0b8522 100644
--- a/src/ngircd/channel.c
+++ b/src/ngircd/channel.c
@@ -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 );

-----END OF PAGE-----