コード例 #1
0
        public void setBotMode()
        {
            bot = true;
            string base_path = Path.Combine(FriendList.accountsPath, Base58Check.Base58CheckEncoding.EncodePlain(walletAddress));

            users = new BotUsers(Path.Combine(base_path, "contacts.dat"), null, true);
            users.loadContactsFromFile();
            groups = new BotGroups(Path.Combine(base_path, "groups.dat"));
            groups.loadGroupsFromFile();
            channels = new BotChannels(Path.Combine(base_path, "channels.dat"));
            channels.loadChannelsFromFile();
        }
コード例 #2
0
        // Perform basic initialization of node
        private void init()
        {
            running = true;

            CoreConfig.maximumServerMasterNodes = Config.maximumStreamClients;
            CoreConfig.maximumServerClients     = Config.maximumStreamClients;

            UpdateVerify.init(Config.checkVersionUrl, Config.checkVersionSeconds);

            // Network configuration
            NetworkUtils.configureNetwork(Config.externalIp, Config.serverPort);

            // Load or Generate the wallet
            if (!initWallet())
            {
                running = false;
                SpixiBot.Program.noStart = true;
                return;
            }

            // Setup the stats console
            statsConsoleScreen = new StatsConsoleScreen();

            PeerStorage.init("");

            // Init TIV
            tiv = new TransactionInclusion();

            string avatarPath = Path.Combine(Config.dataDirectory, "Avatars");

            users = new BotUsers(Path.Combine(Config.dataDirectory, "contacts.dat"), avatarPath, false);
            users.loadContactsFromFile();

            groups = new BotGroups(Path.Combine(Config.dataDirectory, "groups.dat"));
            groups.loadGroupsFromFile();

            channels = new BotChannels(Path.Combine(Config.dataDirectory, "channels.dat"));
            channels.loadChannelsFromFile();

            StreamProcessor.init(Path.Combine(Config.dataDirectory, "Messages"));
        }