Examples of BotOperatorReader


Examples of wzhybridbots.security.BotOperatorReader

   
    // Read the file one by one and add the operators
    // SysOp
    if ( pathSysOp.trim().length() > 0 ) {
      try {
        BotOperatorReader opReader =
          new BotOperatorLineNumberReader( new InputStreamReader(
                              new FileInputStream (
                                  new File ( pathSysOp ) ) ),
                             AccessLevel.SYSOP );
        // Read the file content and add the result to the container
        BotOperatorSet toAdd = opReader.readBotOperators();
        if ( toAdd != null ) {
          this.objBotOperators.addAll( toAdd );
        }
      }
      catch ( FileNotFoundException fnfe ) {
        // The file was not found
        // Print a message for debugging
        System.out.println( "Cannot find file: " + pathSysOp );
      }
    }
   
    // SMod
    if ( pathSMod.trim().length() > 0 ) {
      try {
        BotOperatorReader opReader =
          new BotOperatorLineNumberReader( new InputStreamReader(
                              new FileInputStream (
                                  new File ( pathSMod ) ) ),
                             AccessLevel.SMOD );
        // Read the file content and add the result to the container
        BotOperatorSet toAdd = opReader.readBotOperators();
        if ( toAdd != null ) {
          this.objBotOperators.addAll( toAdd );
        }
      }
      catch ( FileNotFoundException fnfe ) {
        // The file was not found
        // Print a message for debugging
        System.out.println( "Cannot find file: " + pathSMod );
      }
    }
   
    // Mod
    if ( pathMod.trim().length() > 0 ) {
      try {
        BotOperatorReader opReader =
          new BotOperatorLineNumberReader( new InputStreamReader(
                              new FileInputStream (
                                  new File ( pathMod ) ) ),
                             AccessLevel.MOD );
        // Read the file content and add the result to the container
        BotOperatorSet toAdd = opReader.readBotOperators();
        if ( toAdd != null ) {
          this.objBotOperators.addAll( toAdd );
        }
      }
      catch ( FileNotFoundException fnfe ) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.