Merge pull request 'Removed executable and added a check to the Server class to check whether the port is in a valid range' (#7) from remove-executable into main

Reviewed-on: http://gitea.hadi.es/aortigos/ft_irc/pulls/7
This commit is contained in:
2026-05-06 16:20:25 +00:00
2 changed files with 4 additions and 1 deletions

View File

@@ -6,7 +6,7 @@
/* By: iherman- <iherman-@student.42malaga.com +#+ +:+ +#+ */ /* By: iherman- <iherman-@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2026/05/06 17:19:12 by iherman- #+# #+# */ /* Created: 2026/05/06 17:19:12 by iherman- #+# #+# */
/* Updated: 2026/05/06 17:40:52 by iherman- ### ########.fr */ /* Updated: 2026/05/06 18:16:39 by iherman- ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@@ -19,6 +19,9 @@ Server::Server()
Server::Server(int port, const std::string& password) Server::Server(int port, const std::string& password)
{ {
(port < 1 || port > 65535)
throw std::runtime_error("Invalid port");
std::cout << "Server port: " << port << "\nServer Password: " << password << std::endl; std::cout << "Server port: " << port << "\nServer Password: " << password << std::endl;
} }

BIN
ircserv

Binary file not shown.