Merge pull request 'User constructor with fd' (#13) from user-constructor into main

Reviewed-on: http://gitea.hadi.es/aortigos/ft_irc/pulls/13
This commit is contained in:
2026-05-08 14:40:22 +00:00
2 changed files with 7 additions and 1 deletions

View File

@@ -16,11 +16,16 @@
// Constructors //
//////////////////
User::User()
User::User() : fd(-1), nick(""), username(""), realname(""), buffer(""), authenticated(false), registered(false)
{
// std::cout << "User default constructor called" << std::endl;
}
User::User(int fd) : fd(fd), nick(""), username(""), realname(""), buffer(""), authenticated(false), registered(false)
{
// std::cout << "User with fd constructor called" << std::endl;
}
User::User(const User &other)
{
*this = other;

View File

@@ -29,6 +29,7 @@ class User
public:
User();
User(int fd);
User(const User &other);
User& operator=(const User &other);
~User();