~ircdotnet-dev/ircdotnet/devel

« back to all changes in this revision

Viewing changes to IrcDotNet/IrcClient.cs

  • Committer: Alex Regueiro
  • Date: 2010-08-27 22:03:06 UTC
  • Revision ID: alexreg@gmail.com-20100827220306-iqf7ahtgq3ryx2vr
TwitterBot sample is now working. Bot provides the ability for IRC users to log in to Twitter, log out, fetch recent tweets, and send a tweet, among other things. Can handle multiple IRC/Twitter users simultaneously.

Show diffs side-by-side

added added

removed removed

Lines of Context:
126
126
        private bool isDisposed = false;
127
127
 
128
128
        /// <summary>
129
 
        /// Initialiszs a new instance of the <see cref="IrcClient"/> class.
 
129
        /// Initializes a new instance of the <see cref="IrcClient"/> class.
130
130
        /// </summary>
131
131
        public IrcClient()
132
132
        {
146
146
        }
147
147
 
148
148
        /// <summary>
149
 
        /// Finalises an instance of the <see cref="IrcClient"/> class.
 
149
        /// Finalizes an instance of the <see cref="IrcClient"/> class.
150
150
        /// </summary>
151
151
        ~IrcClient()
152
152
        {
568
568
        /// <summary>
569
569
        /// Requests the Message of the Day (MOTD) from the specified server.
570
570
        /// </summary>
571
 
        /// <param name="serverName">The name of the server from which to request the MOTD, or <see langword="null"/>
 
571
        /// <param name="targetServer">The name of the server from which to request the MOTD, or <see langword="null"/>
572
572
        /// for the current server.</param>
573
573
        /// <exception cref="ObjectDisposedException">The object has already been been disposed.</exception>
574
 
        public void GetMessageOfTheDay(string serverName = null)
 
574
        public void GetMessageOfTheDay(string targetServer = null)
575
575
        {
576
576
            CheckDisposed();
577
577
 
578
 
            SendMessageMotd(serverName);
 
578
            SendMessageMotd(targetServer);
579
579
        }
580
580
 
581
581
        /// <summary>
599
599
        /// <summary>
600
600
        /// Requests the version of the specified server.
601
601
        /// </summary>
602
 
        /// <param name="serverName">The name of the server whose version to request.</param>
 
602
        /// <param name="targetServer">The name of the server whose version to request.</param>
603
603
        /// <exception cref="ObjectDisposedException">The object has already been been disposed.</exception>
604
 
        public void GetServerVersion(string serverName = null)
 
604
        public void GetServerVersion(string targetServer = null)
605
605
        {
606
606
            CheckDisposed();
607
607
 
608
 
            SendMessageVersion(serverName);
 
608
            SendMessageVersion(targetServer);
609
609
        }
610
610
 
611
611
        /// <summary>
636
636
        ///     <description>The duration for which the server has been running since its last start.</description>
637
637
        ///   </item>
638
638
        /// </list></param>
639
 
        /// <param name="serverName">The name of the server whose statistics to request.</param>
 
639
        /// <param name="targetServer">The name of the server whose statistics to request.</param>
640
640
        /// <exception cref="ObjectDisposedException">The object has already been been disposed.</exception>
641
 
        public void GetServerInfo(string query = null, string serverName = null)
 
641
        public void GetServerInfo(string query = null, string targetServer = null)
642
642
        {
643
643
            CheckDisposed();
644
644
 
645
 
            SendMessageStats(query, serverName);
 
645
            SendMessageStats(query, targetServer);
646
646
        }
647
647
 
648
648
        /// <summary>
660
660
        {
661
661
            CheckDisposed();
662
662
 
663
 
            SendMessageStats(targetServer, serverMask);
 
663
            SendMessageLinks(serverMask, targetServer);
664
664
        }
665
665
 
666
666
        /// <summary>
667
667
        /// Requests the local time on the specified server.
668
668
        /// </summary>
669
 
        /// <param name="serverName">The name of the server whose local time to request.</param>
 
669
        /// <param name="targetServer">The name of the server whose local time to request.</param>
670
670
        /// <exception cref="ObjectDisposedException">The object has already been been disposed.</exception>
671
 
        public void GetServerTime(string serverName = null)
 
671
        public void GetServerTime(string targetServer = null)
672
672
        {
673
673
            CheckDisposed();
674
674
 
675
 
            SendMessageTime(serverName);
 
675
            SendMessageTime(targetServer);
676
676
        }
677
677
 
678
678
        /// <summary>
679
679
        /// Sends a ping to the specified server.
680
680
        /// </summary>
681
 
        /// <param name="serverName">The name of the server to ping.</param>
 
681
        /// <param name="targetServer">The name of the server to ping.</param>
682
682
        /// <exception cref="ObjectDisposedException">The object has already been been disposed.</exception>
683
 
        public void Ping(string serverName = null)
 
683
        public void Ping(string targetServer = null)
684
684
        {
685
685
            CheckDisposed();
686
686
 
687
 
            SendMessagePing(this.localUser.NickName, serverName);
 
687
            SendMessagePing(this.localUser.NickName, targetServer);
688
688
        }
689
689
 
690
690
        /// <summary>