R-Type
Distributed multiplayer game engine in C++
Loading...
Searching...
No Matches
KickCommand.hpp
Go to the documentation of this file.
1
/*
2
** EPITECH PROJECT, 2025
3
** Created on 14/01/2026.
4
** File description:
5
** KickCommand.hpp
6
*/
7
8
#pragma once
9
10
#include <string>
11
#include <vector>
12
#include "
ICommand.hpp
"
13
14
namespace
server
{
15
25
class
KickCommand
:
public
ICommand
{
26
public
:
27
KickCommand
() =
default
;
28
~KickCommand
()
override
=
default
;
29
30
std::string
execute
(
const
std::vector<std::string> &args,
const
CommandContext
&context)
override
;
31
std::string
getName
()
const override
{
return
"kick"
; }
32
std::string
getDescription
()
const override
{
return
"Kick a player from the room"
; }
33
std::string
getUsage
()
const override
{
return
"/kick <player_id>"
; }
34
};
35
36
}
// namespace server
ICommand.hpp
server::ICommand
Interface for all chat commands.
Definition
ICommand.hpp:23
server::KickCommand
Kicks a player from the current room.
Definition
KickCommand.hpp:25
server::KickCommand::KickCommand
KickCommand()=default
server::KickCommand::getUsage
std::string getUsage() const override
Get command usage.
Definition
KickCommand.hpp:33
server::KickCommand::~KickCommand
~KickCommand() override=default
server::KickCommand::getName
std::string getName() const override
Get command name.
Definition
KickCommand.hpp:31
server::KickCommand::getDescription
std::string getDescription() const override
Get command description.
Definition
KickCommand.hpp:32
server::KickCommand::execute
std::string execute(const std::vector< std::string > &args, const CommandContext &context) override
Execute the command.
Definition
KickCommand.cpp:15
server
Definition
CommandContext.hpp:16
server::CommandContext
Context information for command execution.
Definition
CommandContext.hpp:28
server
Commands
KickCommand.hpp
Generated by
1.9.8