예제 #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
 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;
 }