/// <summary> /// Sends the registration commands needed when initialising an IRC connection. /// </summary> /// <param name="password">The password of the server.</param> /// <param name="username">The user name to connect with.</param> /// <param name="nickname">The nick name to connect with.</param> /// <param name="realName">The real name to connect with.</param> public void RegisterClient(string password, string username, string nickname, string realName) { PasswordMessage passMessage = new PasswordMessage(password); NickMessage nickMessage = new NickMessage(nickname); UserMessage userMessage = new UserMessage(username, realName); this.Send(passMessage.ToString()); this.Send(nickMessage.ToString()); this.Send(userMessage.ToString()); }