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
22
include/commands/ping.hpp
Normal file
22
include/commands/ping.hpp
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ping.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/06/02 22:48:36 by rparodi #+# #+# */
|
||||
/* Updated: 2025/06/02 22:48:48 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "commands.hpp"
|
||||
|
||||
class cmd::Ping : public ACommand {
|
||||
public:
|
||||
Ping(User *user, Channel *channel, Server *server, const std::string &line) : ACommand(user, channel, server, line) {}
|
||||
virtual void execute(void);
|
||||
virtual bool checkArgs();
|
||||
};
|
||||
21
include/commands/pong.hpp
Normal file
21
include/commands/pong.hpp
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* pong.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/06/02 22:48:36 by rparodi #+# #+# */
|
||||
/* Updated: 2025/06/02 23:01:19 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "commands.hpp"
|
||||
|
||||
class cmd::Pong {
|
||||
public:
|
||||
Pong(void){}
|
||||
clock_t answer(clock_t start);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue