]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/conf.c
- neue Konfigurationsoption "OperCanUseMode" (Sektion "Global"):
[ngircd-alex.git] / src / ngircd / conf.c
index d4410325c9d682bab1672858eeaf637ea1b911ce..a1f8fdc37e35576f8de938c49a19b5bf4874141c 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: conf.c,v 1.27 2002/05/30 16:52:21 alex Exp $
+ * $Id: conf.c,v 1.28 2002/09/02 14:59:17 alex Exp $
  *
  * conf.h: Konfiguration des ngircd
  */
@@ -100,6 +100,7 @@ Conf_Test( VOID )
        printf( "  PingTimeout = %d\n", Conf_PingTimeout );
        printf( "  PongTimeout = %d\n", Conf_PongTimeout );
        printf( "  ConnectRetry = %d\n", Conf_ConnectRetry );
+       printf( "  OperCanUseMode = %s\n", Conf_OperCanMode == TRUE ? "yes" : "no" );
        puts( "" );
 
        for( i = 0; i < Conf_Oper_Count; i++ )
@@ -167,6 +168,8 @@ Set_Defaults( VOID )
        Conf_Oper_Count = 0;
        Conf_Server_Count = 0;
        Conf_Channel_Count = 0;
+
+       Conf_OperCanMode = FALSE;
 } /* Set_Defaults */
 
 
@@ -371,6 +374,15 @@ Handle_GLOBAL( INT Line, CHAR *Var, CHAR *Arg )
                if(( Conf_ConnectRetry ) < 5 ) Conf_ConnectRetry = 5;
                return;
        }
+       if( strcasecmp( Var, "OperCanUseMode" ) == 0 )
+       {
+               /* Koennen IRC-Operatoren immer MODE benutzen? */
+               if( strcasecmp( Arg, "yes" ) == 0 ) Conf_OperCanMode = TRUE;
+               else if( strcasecmp( Arg, "true" ) == 0 ) Conf_OperCanMode = TRUE;
+               else if( atoi( Arg ) != 0 ) Conf_OperCanMode = TRUE;
+               else Conf_OperCanMode = FALSE;
+               return;
+       }
                
        Config_Error( LOG_ERR, "%s, line %d (section \"Global\"): Unknown variable \"%s\"!", NGIRCd_ConfFile, Line, Var );
 } /* Handle_GLOBAL */