Beispiel #1
0
        public IrcDaemon(IrcMode ircMode = IrcMode.Modern)
        {
            Capabilities = new List <string>();

            // Create Optionobject & Set the proper IRC Protocol Version
            // The protocol version cannot be changed after construction,
            // because the construction methods below use this Option
            options = new ServerOptions(ircMode);

            //Clean Interface to statistics, it needs the IrcDaemon Object to gather this information.
            stats = new ServerStats(this);

            // Setup Modes Infrastructure
            modeFactory           = new ModeFactory();
            supportedChannelModes = new ChannelModeList(this);
            supportedRanks        = new RankList(this);
            supportedUserModes    = new UserModeList(this);

            // The Protocol Objects
            commands      = new CommandList(this);
            replies       = new ServerReplies.ServerReplies(this);
            serverCreated = DateTime.Now;

            // Add Commands
            SetupCommands();
            // Add Modes
            SetupModes();
            //Add ChannelTypes
            SetupChannelTypes();
        }
Beispiel #2
0
        public IrcDaemon(IrcMode ircMode = IrcMode.Modern)
        {
            Capabilities = new List<string>();

            // Create Optionobject & Set the proper IRC Protocol Version
            // The protocol version cannot be changed after construction,
            // because the construction methods below use this Option
            Options = new ServerOptions(ircMode);

            //Clean Interface to statistics, it needs the IrcDaemon Object to gather this information.
            Stats = new ServerStats(this);

            // Setup Modes Infrastructure
            ModeFactory = new ModeFactory();
            SupportedChannelModes = new ChannelModeList(this);
            SupportedRanks = new RankList(this);
            SupportedUserModes = new UserModeList(this);

            // The Protocol Objects
            Commands = new CommandList(this);
            Replies = new ServerReplies.ServerReplies(this);
            ServerCreated = DateTime.Now;

            // Add Commands
            SetupCommands();
            // Add Modes
            SetupModes();
            //Add ChannelTypes
            SetupChannelTypes();
        }
Beispiel #3
0
        public UserInfo(IrcDaemon ircDaemon, Socket socket, string host, bool isAcceptSocket, bool passAccepted)
            : base(ircDaemon)
        {
            IsService    = false;
            Registered   = false;
            PassAccepted = passAccepted;
            Host         = host;
            Created      = DateTime.Now;

            IsAcceptSocket = isAcceptSocket;
            Socket         = socket;

            Modes = new UserModeList(ircDaemon);
        }
Beispiel #4
0
        public UserInfo(IrcDaemon ircDaemon, Socket socket, string host, bool isAcceptSocket, bool passAccepted)
            : base(ircDaemon)
        {
            IsService = false;
            Registered = false;
            PassAccepted = passAccepted;
            Host = host;
            Created = DateTime.Now;

            this.isAcceptSocket = isAcceptSocket;
            this.socket = socket;

            modes = new UserModeList(ircDaemon);
        }
Beispiel #5
0
        public UserInfo(IrcDaemon ircDaemon, Socket socket, long profileId, string host, bool isAcceptSocket, bool passAccepted, object state, Func <object, string, int> send)
            : base(ircDaemon)
        {
            _send        = send;
            _state       = state;
            ProfileId    = profileId;
            IsService    = false;
            Registered   = false;
            PassAccepted = passAccepted;
            Host         = host;
            Created      = DateTime.Now;
            Capabilities = null;

            IsAcceptSocket = isAcceptSocket;
            Socket         = socket;

            Modes = new UserModeList(ircDaemon);
        }