diff --git a/include/core/server.hpp b/include/core/server.hpp index 6f050f8..bfefe28 100644 --- a/include/core/server.hpp +++ b/include/core/server.hpp @@ -6,7 +6,7 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/05/13 11:06:56 by rparodi #+# #+# */ -/* Updated: 2025/05/13 11:42:11 by rparodi ### ########.fr */ +/* Updated: 2025/05/13 12:54:02 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ @@ -22,5 +22,6 @@ class Server { Server(); Server(int port, const std::string &password); ~Server(); + void showInfo() const; unsigned short int getPort() const; }; diff --git a/sources/core/main.cpp b/sources/core/main.cpp index 13a5c5d..3dd8938 100644 --- a/sources/core/main.cpp +++ b/sources/core/main.cpp @@ -6,7 +6,7 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/05/13 11:03:13 by rparodi #+# #+# */ -/* Updated: 2025/05/13 11:56:50 by rparodi ### ########.fr */ +/* Updated: 2025/05/13 12:56:52 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ @@ -24,6 +24,7 @@ int main(int argc, char *argv[]) { return 1; } Server server(tmp_port, argv[2]); + server.showInfo(); while (1) ; return 0; diff --git a/sources/core/server.cpp b/sources/core/server.cpp index e26b68f..003047f 100644 --- a/sources/core/server.cpp +++ b/sources/core/server.cpp @@ -6,10 +6,11 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/05/13 11:11:07 by rparodi #+# #+# */ -/* Updated: 2025/05/13 12:00:55 by rparodi ### ########.fr */ +/* Updated: 2025/05/13 12:55:21 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ +#include "color.hpp" #include "core.hpp" #include @@ -41,6 +42,13 @@ Server::~Server() { std::cout << CLR_GREY << "Info: Server destructor called" << CLR_RESET << std::endl; } +void Server::showInfo() const { + std::cout << CLR_GREY << "IRCSettings:" << CLR_RESET << std::endl; + std::cout << CLR_GREY << "\t- Port:\t\t" << CLR_GREEN << this->_port << CLR_RESET << std::endl; + std::cout << CLR_GREY << "\t- Password:\t" << CLR_GREEN << this->_password << CLR_RESET << std::endl; + +} + /** * @brief The getter of the port. *