VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
VoltCommand.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Host/Plugins/PluginLoader.hpp
"
4
#include "
Host/Plugins/PluginRegistry.hpp
"
5
6
#include <
VoltMod/Engine/Server/ServerCommand.hpp
>
7
#include <string_view>
8
9
namespace
VoltMod
10
{
11
12
/** The operator's `volt` console command. Registered before any plugin loads, so a plugin taking
13
* `volt` gets the usual conflict error. */
14
class
VoltCommand
15
{
16
public
:
17
VoltCommand
(
PluginRegistry
& registry,
PluginLoader
& loader);
18
~VoltCommand
();
19
20
VoltCommand
(
const
VoltCommand
&) =
delete
;
21
VoltCommand
&
operator=
(
const
VoltCommand
&) =
delete
;
22
23
private
:
24
void
Run(
const
CCommand& arguments);
25
/** The release and the commit the host was built from. */
26
void
PrintVersion()
const
;
27
void
PrintLoaded()
const
;
28
void
PrintStatus(std::string_view name);
29
/** `volt log <name> <level>`: silence one plugin below @p level. */
30
void
SetLogLevel(std::string_view name, std::string_view level);
31
32
PluginRegistry
& _registry;
33
PluginLoader
& _loader;
34
ServerCommand
_command;
35
};
36
37
}
// namespace VoltMod
PluginLoader.hpp
PluginRegistry.hpp
ServerCommand.hpp
VoltMod::PluginLoader
Finds the installed plugins and loads the ones their dependencies allow.
Definition
PluginLoader.hpp:35
VoltMod::PluginRegistry
The loaded plugins and the engine events raised on them, one per process.
Definition
PluginRegistry.hpp:22
VoltMod::ServerCommand
RAII server console command: registers a tier1 ConCommand on construction and unregisters on destruct...
Definition
ServerCommand.hpp:23
VoltMod::VoltCommand::operator=
VoltCommand & operator=(const VoltCommand &)=delete
VoltMod::VoltCommand::VoltCommand
VoltCommand(PluginRegistry ®istry, PluginLoader &loader)
Definition
VoltCommand.cpp:19
VoltMod::VoltCommand::~VoltCommand
~VoltCommand()
VoltMod::VoltCommand::VoltCommand
VoltCommand(const VoltCommand &)=delete
VoltMod
Definition
Options.hpp:13
src
Host
Console
VoltCommand.hpp
Generated by
1.15.0