コード例 #1
0
 public SysOp(BBS bbs, BBSDataCore bbsDataCore)
 {
     _bbs         = bbs;
     _bbsDataCore = bbsDataCore;
     Userid       = _bbs.CurrentUser.Id;
     Columns      = _bbs.terminalType.Columns();
 }
コード例 #2
0
ファイル: UDBases.cs プロジェクト: ch0mik/SixNet
 public UDBases(BBS bbs, BBSDataCore bbsDataCore)
 {
     _bbs         = bbs;
     _bbsDataCore = bbsDataCore;
     Current_Area = -1;
     //Current_Parent_Area = -1;
     _bbs.SendFileForTermType("udbase_entry_root", true);
     CMD_List();
 }
コード例 #3
0
 public PFiles(BBS bbs, BBSDataCore bbsDataCore)
 {
     _bbs              = bbs;
     _bbsDataCore      = bbsDataCore;
     _bbs.CurrentArea  = "PFiles";
     _currentPFileArea = null;
     _bbs.SendFileForTermType("pfile_entry_root", false);
     CmdList();
 }
コード例 #4
0
ファイル: MessageBases.cs プロジェクト: ch0mik/SixNet
 public MessageBases(BBS bbs, BBSDataCore bbsDataCore)
 {
     _bbs         = bbs;
     _bbsDataCore = bbsDataCore;
     Current_Area = -1;
     //Current_Parent_Area = -1;
     _bbs.SendFileForTermType("messagebase_entry_root", true);
     CMD_List();
     RecalculatePath();
 }
コード例 #5
0
ファイル: Program.cs プロジェクト: ch0mik/SixNet
        public static void Main(string[] args)
        {
            Console.Clear();
            Console.WriteLine("SixNet BBS, Starting up...");
            _bbsDatabaseConfiguration = BBSDatabaseConfiguration.LoadConfig("./");
            if (_bbsDatabaseConfiguration == null)
            {
                Console.WriteLine("Run setup utility first.");
                return;
            }
            _connectionString = BBSDatabaseConfiguration.BuildConnectionString(_bbsDatabaseConfiguration);
            LoggingAPI.Init("./Logs/");
            if (BBSDatabaseConfiguration.IsDatabaseSetup(_connectionString))
            {
                Console.WriteLine("Database configured.");
                _core = new BBSDataCore(_connectionString);
            }
            else
            {
                Console.WriteLine("Database not configured - run setup utility.");
                return;
            }
            var config = _core.GetBBSConfig();

            LoggingAPI.LogEntry("Software started.");
            try
            {
                quitFlag = false;
                BBSServer bbsServer = new BBSServer(_connectionString, config.BBSPort, "BBS Server");
                bbsServer.Start();
                while (!quitFlag)
                {
                    Thread.Sleep(100);
                    if (Console.KeyAvailable)
                    {
                        if (Console.ReadKey().Key == ConsoleKey.Q)
                        {
                            quitFlag = true;
                            bbsServer.Stop();
                            break;
                        }
                    }
                }
            }
            catch (Exception e)
            {
                LoggingAPI.Error(e);
            }
            finally
            {
                LoggingAPI.LogEntry("Software shutdown.");
                LoggingAPI.FlushQueue();
            }
        }
コード例 #6
0
ファイル: BBS.cs プロジェクト: 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");
        }
コード例 #7
0
ファイル: News.cs プロジェクト: ch0mik/SixNet
 public News(BBS bbs, BBSDataCore bbsDataCore)
 {
     _bbs         = bbs;
     _bbsDataCore = bbsDataCore;
 }
コード例 #8
0
 public GraffitiWall(BBS bbs, BBSDataCore bbsDataCore)
 {
     _bbs             = bbs;
     _bbsDataCore     = bbsDataCore;
     _bbs.currentArea = "Graffiti Wall";
 }
コード例 #9
0
 public LastTen(BBS bbs, BBSDataCore bbsDataCore)
 {
     _bbs         = bbs;
     _bbsDataCore = bbsDataCore;
 }
コード例 #10
0
 public Main(BBS bbs, BBSDataCore bbsDataCore)
 {
     _bbs         = bbs;
     _bbsDataCore = bbsDataCore;
     _bbsConfig   = bbsDataCore.GetBBSConfig();
 }
コード例 #11
0
ファイル: Program.cs プロジェクト: ch0mik/SixNet
        private static void MainMenu()
        {
            _exitFlag = false;
            while (!_exitFlag)
            {
                Console.Clear();
                Console.WriteLine("SixNet Setup Utility");
                Divider();
                if (BBSDatabaseConfiguration.IsDatabaseSetup(_connectionString))
                {
                    Console.WriteLine("Database configured.");
                    _core = new BBSDataCore(_connectionString);
                }
                else
                {
                    Console.WriteLine("Database not configured.");
                }
                Divider();
                Console.WriteLine("1. Configure  Database");
                if (BBSDatabaseConfiguration.IsDatabaseSetup(_connectionString))
                {
                    Console.WriteLine("2. Configure BBS");
                    Console.WriteLine("3. Setup Message Bases");
                    Console.WriteLine("4. Setup UD Bases");
                    Console.WriteLine("5. Setup GFile Areas");
                    Console.WriteLine("6. Setup PFile Areas");
                    Console.WriteLine("S. Save Configuration");
                }
                Console.WriteLine("X. Exit");
                var selection = Input("Select", "");
                switch (selection.ToUpper())
                {
                case "1":
                    SetupDatabase();
                    break;

                case "2":
                    SetupBBS();
                    break;

                case "5":
                    SetupGFileAreas();
                    break;

                case "6":
                    SetupPFileAreas();
                    break;

                case "S":
                    BBSDatabaseConfiguration.SaveConfig(_basePath, _bbsDatabaseConfiguration);
                    break;

                case "X":
                    _exitFlag = true;
                    break;

                default:
                    break;
                }
            }
        }
コード例 #12
0
ファイル: Login.cs プロジェクト: ch0mik/SixNet
 public Login(BBS bbs, BBSDataCore bbsDataCore)
 {
     _bbs         = bbs;
     _bbsDataCore = bbsDataCore;
 }