Exemplo n.º 1
0
        /// <summary>
        ///     Registers the connection.
        /// </summary>
        /// <param name="registrationInfo"></param>
        /// <returns></returns>
        private async Task RegisterConnectionAsync(IrcRegistrationInfo registrationInfo)
        {
            if (registrationInfo.Password != null)
            {
                await SendPasswordAsync(registrationInfo.Password);
            }

            await SendNickAsync(registrationInfo.NickName);
            await SendUserAsync(registrationInfo.UserName);
        }
Exemplo n.º 2
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="IrcClient"/> class.
        /// </summary>
        /// <param name="host">The host of the IRC server.</param>
        /// <param name="port">The port of the IRC server.</param>
        /// <param name="registrationInfo"> The user informations used for registering the connection.</param>
        public IrcClient(string host, int port, IrcRegistrationInfo registrationInfo, IIrcAntiFlood antiFlood, string[] capabilities)
        {
            Host = host;
            Port = port;
            _registrationInfo = registrationInfo;
            _antiFlood        = antiFlood;
            Capabilities      = capabilities;

            State = IrcState.Offline;


            InitMessageHandlers();
        }
Exemplo n.º 3
0
 public IrcClient(string host, int port, IrcRegistrationInfo registrationInfo) : this(host, port, registrationInfo, null, null)
 {
 }
Exemplo n.º 4
0
 public IrcClient(string host, int port, IrcRegistrationInfo registrationInfo, IIrcAntiFlood antiFlood) : this(host, port, registrationInfo, antiFlood, null)
 {
 }