aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/ScriptServer/ScriptServerMain.cs
blob: 4fce3d60587313fd5b41217faea412de0d2eeac7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using OpenSim.Framework.Console;
using OpenSim.Framework.Utilities;

namespace OpenSim.Grid.ScriptServer
{
    class ScriptServerMain : conscmd_callback
    {
        private readonly string m_logFilename = ("region-console.log");
        public RegionScriptDaemon RegionScriptDaemon;           // Listen for incoming from region
        public RegionsManager RegionManager;                    // Handle regions
        public ScriptEngineLoader ScriptEngineLoader;           // Loads scriptengines
        private LogBase m_log;

        public ScriptServerMain()
        {
            m_log = CreateLog();

            RegionScriptDaemon = new RegionScriptDaemon(this);
            RegionManager = new RegionsManager(this);
            ScriptEngineLoader = new ScriptEngineLoader(m_log);
        }

        ~ScriptServerMain()
        {
        }

        protected LogBase CreateLog()
        {
            if (!Directory.Exists(Util.logDir()))
            {
                Directory.CreateDirectory(Util.logDir());
            }

            return new LogBase((Path.Combine(Util.logDir(), m_logFilename)), "Region", this, false);
        }

        public void RunCmd(string command, string[] cmdparams)
        {
        }
        public void Show(string ShowWhat)
        {
        }

    }
}