Inheritance: XG.Plugin.ANotificationSender
Exemple #1
0
        protected override void StopRun()
        {
            ConnectionStopped = DateTime.Now;
            _log.Info("StopRun(" + Server + ")");

            Stopwatch();

            _client.OnConnected         -= ClientOnConnected;
            _client.OnDisconnected      -= ClientOnDisconnected;
            _client.OnMessage           -= ClientOnMessage;
            _client.OnReadLine          -= ClientOnReadLine;
            _client.OnChannelJoined     -= ClientOnChannelJoined;
            _client.OnBotJoined         -= ClientOnBotJoined;
            _client.OnUserJoined        -= ClientOnUserJoined;
            _client.OnQueueChannel      -= ClientOnQueueChannel;
            _client.OnNotificationAdded -= FireNotificationAdded;

            _client.Disconnect();
            _client = null;

            if (OnDisconnected != null)
            {
                OnDisconnected(this, new EventArgs <Server>(Server));
            }
        }
Exemple #2
0
        protected override void StartRun()
        {
            _log.Info("StartRun(" + Server + ")");

            _client = new XdccClient
            {
                Server = Server
            };

            _client.OnConnected         += ClientOnConnected;
            _client.OnDisconnected      += ClientOnDisconnected;
            _client.OnMessage           += ClientOnMessage;
            _client.OnReadLine          += ClientOnReadLine;
            _client.OnChannelJoined     += ClientOnChannelJoined;
            _client.OnBotJoined         += ClientOnBotJoined;
            _client.OnUserJoined        += ClientOnUserJoined;
            _client.OnQueueChannel      += ClientOnQueueChannel;
            _client.OnNotificationAdded += FireNotificationAdded;

            ConnectionStarted = DateTime.Now;
            _client.Connect();
        }
        protected override void StopRun()
        {
            ConnectionStopped = DateTime.Now;
            _log.Info("StopRun(" + Server + ")");

            Stopwatch();

            _client.OnConnected -= ClientOnConnected;
            _client.OnDisconnected -= ClientOnDisconnected;
            _client.OnMessage -= ClientOnMessage;
            _client.OnReadLine -= ClientOnReadLine;
            _client.OnChannelJoined -= ClientOnChannelJoined;
            _client.OnBotJoined -= ClientOnBotJoined;
            _client.OnUserJoined -= ClientOnUserJoined;
            _client.OnQueueChannel -= ClientOnQueueChannel;
            _client.OnNotificationAdded -= FireNotificationAdded;

            _client.Disconnect();
            _client = null;

            if (OnDisconnected != null)
            {
                OnDisconnected(this, new EventArgs<Server>(Server));
            }
        }
        protected override void StartRun()
        {
            _log.Info("StartRun(" + Server + ")");

            _client = new XdccClient
            {
                Server = Server
            };

            _client.OnConnected += ClientOnConnected;
            _client.OnDisconnected += ClientOnDisconnected;
            _client.OnMessage += ClientOnMessage;
            _client.OnReadLine += ClientOnReadLine;
            _client.OnChannelJoined += ClientOnChannelJoined;
            _client.OnBotJoined += ClientOnBotJoined;
            _client.OnUserJoined += ClientOnUserJoined;
            _client.OnQueueChannel += ClientOnQueueChannel;
            _client.OnNotificationAdded += FireNotificationAdded;

            ConnectionStarted = DateTime.Now;
            _client.Connect();
        }