Files
ft_irc/Server/Server.cpp
2026-05-06 18:27:10 +02:00

41 lines
1.3 KiB
C++

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Server.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: iherman- <iherman-@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/05/06 17:19:12 by iherman- #+# #+# */
/* Updated: 2026/05/06 18:22:36 by iherman- ### ########.fr */
/* */
/* ************************************************************************** */
#include "Server.hpp"
Server::Server()
{
std::cout << "Hello from server" << std::endl;
}
Server::Server(int port, const std::string& password)
{
if (port < 1 || port > 65535)
throw std::runtime_error("Invalid port");
std::cout << "Server port: " << port << "\nServer Password: " << password << std::endl;
}
Server::~Server()
{
}
Server &Server::operator=(const Server& other)
{
if (this != &other)
{
std::cout << "operator= called" << std::endl;
}
return *this;
}