<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

using Meebey.SmartIrc4net;

namespace SteamIrcBot
{
    class SenderDetails
    {
        public string Nickname { get; set; }
        public string Ident { get; set; }
        public string Hostname { get; set; }

        public override string ToString()
        {
            return string.Format( "{0}!{1}@{2}", Nickname, Ident, Hostname );
        }
    }

    class IRC
    {
        static IRC _instance = new IRC();
        public static IRC Instance { get { return _instance; } }


        public CommandManager CommandManager { get; private set; }


        IrcClient client = new IrcClient();
        bool shuttingDown = false;

        DateTime nextConnect;
        public bool Connected
        {
            get
            {
                if ( !client.IsConnected )
                    return false;

                if ( nextConnect != DateTime.MaxValue )
                    return false; // if we have a connection scheduled, we're not connected

                return true;
            }
        }



        IRC()
        {
            nextConnect = DateTime.MaxValue;

            client.SendDelay = ( int )TimeSpan.FromSeconds( 1.5 ).TotalMilliseconds;
            client.Encoding = Encoding.UTF8;<commit_msg>Reduce send delay for IRC messages.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

using Meebey.SmartIrc4net;

namespace SteamIrcBot
{
    class SenderDetails
    {
        public string Nickname { get; set; }
        public string Ident { get; set; }
        public string Hostname { get; set; }

        public override string ToString()
        {
            return string.Format( "{0}!{1}@{2}", Nickname, Ident, Hostname );
        }
    }

    class IRC
    {
        static IRC _instance = new IRC();
        public static IRC Instance { get { return _instance; } }


        public CommandManager CommandManager { get; private set; }


        IrcClient client = new IrcClient();
        bool shuttingDown = false;

        DateTime nextConnect;
        public bool Connected
        {
            get
            {
                if ( !client.IsConnected )
                    return false;

                if ( nextConnect != DateTime.MaxValue )
                    return false; // if we have a connection scheduled, we're not connected

                return true;
            }
        }



        IRC()
        {
            nextConnect = DateTime.MaxValue;

            client.SendDelay = ( int )TimeSpan.FromSeconds( 0.5 ).TotalMilliseconds;
            client.Encoding = Encoding.UTF8;
{'fraction_non_alphanumeric': 0.08272594752186589, 'fraction_numerical': 0.00510204081632653, 'mean_word_length': 1.7205153617443012, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2187891', 'n_tokens_mistral': 746, 'n_tokens_neox': 697, 'n_words': 212}