Removed executable and added a check to the Server class to check whether the port is in a valid range

This commit is contained in:
iherman-
2026-05-06 18:19:17 +02:00
parent f2bbec366b
commit cbc6c7fc41
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.