feat(cmd/p*ng): adding ping/pong commands and patch the configuration for irssi issues
This commit is contained in:
parent
97103ac852
commit
731d40061d
6 changed files with 118 additions and 5 deletions
26
sources/commands/pong.cpp
Normal file
26
sources/commands/pong.cpp
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* pong.cpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/05/24 17:29:48 by rparodi #+# #+# */
|
||||
/* Updated: 2025/06/02 23:04:53 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "commands.hpp"
|
||||
#include "logs.hpp"
|
||||
#include "pong.hpp"
|
||||
#include <ctime>
|
||||
|
||||
using namespace cmd;
|
||||
|
||||
/**
|
||||
* @brief Execute the Pong
|
||||
* @note answer to PING command (managed by the server)
|
||||
*/
|
||||
clock_t Pong::answer(clock_t start) {
|
||||
return (start - (clock() / CLOCKS_PER_SEC));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue