Пример #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Startup");

            HttpResponder.StartHttpListener();
            IrcServer.Start();

            if (args.Length == 1 && args[0] == "console")
            {
                fConsoleMode = true;

                new Worker().loadparty();

                GameBot.Bot b = new GameBot.Bot("roller", "roller");
                b.ConsoleLoop();
                return;
            }

            new Worker().loadparty();

            Thread botThread = new Thread(GameBot.Bot.Start);

            botThread.Start();

            System.Net.Sockets.TcpListener listener;

            listener = new TcpListener(IPAddress.Any, 6668);

            listener.Start();

            for (; ;)
            {
                TcpClient client = listener.AcceptTcpClient();

                Console.WriteLine("Accepting a connection");

                Thread t = new Thread(Program.DoWork);
                t.Start(client);
            }
        }
Пример #2
0
 public static void Start()
 {
     ircserver = new IrcServer();
 }