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