示例#1
0
        /// <summary>
        /// Starts the irc client with the given parameters in the constructor
        /// </summary>
        /// <returns>true or false depending if it starts succesfully</returns>
        public bool StartClient()
        {
            if (IrcClient != null)
            {
                if (!IrcClient.IsConnectionEstablished())
                {
                    IrcClient.Connect();

                    int timeout = 0;
                    while (!IrcClient.IsClientRunning())
                    {
                        Thread.Sleep(1);
                        if (timeout >= 3000)
                        {
                            return(false);
                        }
                        timeout++;
                    }
                    return(true);
                }
            }

            return(false);
        }
示例#2
0
 /// <summary>
 /// Checks if the client is running.
 /// </summary>
 /// <returns>true or false</returns>
 public bool IsClientRunning()
 {
     return(IrcClient.IsClientRunning());
 }