Exemplo n.º 1
0
Arquivo: BBS.cs Projeto: ch0mik/SixNet
        //private readonly bool _slackEnabled;
        //private readonly SlackIntegration _slackIntegration;

        public BBS(IBBSHost bbsHost, StateObject stateObject, string ConnectionString)
        {
            connectionTimestamp        = DateTime.Now;
            _bbsDataCore               = new BBSDataCore(ConnectionString);
            _bbsHost                   = bbsHost;
            base._stateObject          = stateObject;
            messageQueueTimer.Enabled  = false;
            messageQueueTimer.Interval = 100;
            messageQueueTimer.Elapsed += new System.Timers.ElapsedEventHandler(MessageQueueTimer_Elapsed);
            _remoteAddress             = stateObject.RemoteAddress;
            //_slackEnabled = (_dataInterface.GetUserDefinedField(0, "SLACKENABLED") == "1");
            //if (_slackEnabled) _slackIntegration = new SlackIntegration(_dataInterface);

            LoggingAPI.SysLogEntry(_remoteAddress + ": User Connected");
        }
Exemplo n.º 2
0
        public BBS(IBBSHost host_system, StateObject so, string ConnectionString)
        {
            ConnectionTimeStamp        = DateTime.Now;
            _dataInterface             = new DataInterface(ConnectionString);
            Host_System                = host_system;
            State_Object               = so;
            MessageQueueTimer.Enabled  = false;
            MessageQueueTimer.Interval = 100;
            MessageQueueTimer.Elapsed += new System.Timers.ElapsedEventHandler(MessageQueueTimer_Elapsed);
            _remoteAddress             = so.workSocket.RemoteEndPoint.ToString();
            _slackEnabled              = (_dataInterface.GetUserDefinedField(0, "SLACKENABLED") == "1");
            if (_slackEnabled)
            {
                _slackIntegration = new SlackIntegration(_dataInterface);
            }

            LoggingAPI.SysLogEntry(_remoteAddress + ": User Connected");
        }