feat(core): adding the server info method
This commit is contained in:
parent
e6e9158d3b
commit
a1ffeaddda
3 changed files with 13 additions and 3 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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;
|
||||
|
|
|
|||
|
|
@ -6,10 +6,11 @@
|
|||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 <iostream>
|
||||
|
||||
|
|
@ -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.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue