示例#1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FnordBot"/> class.
        /// </summary>
        public FnordBot()
        {
            queues = new StringQueueHash(); // hent fra config
            //this.installationFolderPath = installationFolderPath;	//needed?
            rnd = new Random();
            channelsToJoin = new StringCollection();
            users = LoadUsers();

            // initialize the client layer - maybe we should use the protocol layer directly?
            irc = new Client();
            // attach to the events that the client layer can throw
            AttachEvents();
        }
示例#2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FnordBot"/> class.
        /// </summary>
        /// <param name="installationFolderPath">The installation folder path.</param>
        public FnordBot( string installationFolderPath )
        {
            queues = new StringQueueHash(); // hent fra config
            this.installationFolderPath = installationFolderPath;
            // fix the install-path
            if ( !installationFolderPath.EndsWith("\\") )
                installationFolderPath += "\\";
            // init the random number god
            rnd = new Random();
            channelsToJoin = new StringCollection();
            // initialize the user logic
            //			userModule = new NielsRask.FnordBot.Users.Module( installationFolderPath+"Users.xml" ); // devel-sti, den skal også kigge i ./users.xml

            // load the userlist
            usersFilePath = installationFolderPath+"Users.xml";
            log.Debug("userlist path: "+usersFilePath);
            users = LoadUsers();

            // initialize the client layer - maybe we should use the protocol layer directly?
            irc = new Client();
            // attach to the events that the client layer can throw
            AttachEvents();
        }