Пример #1
0
        public override bool Connect()
        {
            base.Connect();
            NetworkStream.WriteMessageLine("PASS oauth:AUTH");
            NetworkStream.WriteMessageLine("NICK lepstr");
            NetworkStream.WriteMessageLine("JOIN #lepstr");
            NetworkStream.Flush();

            var users = GetChannelParticipants();
            _targetChannel = new IrcChannel("lepstr", users);
            _updateTimer = new Timer(TimerCallback);
            _updateTimer.Change(0, 62000);

            HandleIrcMessageAsync();

            return true;
        }
Пример #2
0
        public override void Dispose()
        {
            if (!IsConnected)
            {
                base.Dispose();

                _updateTimer?.Dispose();
                _targetChannel = null;
            }
        }
Пример #3
0
 public ChannelUpdatedEventArgs(IrcChannel channel)
 {
     _channel = channel;
 }