about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2002-11-22 17:57:15 +0000
committerAlexander Barton <alex@barton.de>2002-11-22 17:57:15 +0000
commit7233b72145360ff390613c2922437f1469e4cb32 (patch)
treeae2dd603f88545f2949255997b56a5625d93f8ae
parent1656841f25447b9ea3237e0b72f1fbcb8b747c4d (diff)
downloadngircd-7233b72145360ff390613c2922437f1469e4cb32.tar.gz
ngircd-7233b72145360ff390613c2922437f1469e4cb32.zip
- Channel_InitPredefined() prueft nun, ob ein Channel bereits existiert.
-rw-r--r--src/ngircd/channel.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ngircd/channel.c b/src/ngircd/channel.c
index dc06042c..c30d4d55 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 );