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
5
7#include <string_view>
8
9namespace 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. */
15{
16public:
19
20 VoltCommand(const VoltCommand&) = delete;
22
23private:
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
Finds the installed plugins and loads the ones their dependencies allow.
The loaded plugins and the engine events raised on them, one per process.
RAII server console command: registers a tier1 ConCommand on construction and unregisters on destruct...
VoltCommand & operator=(const VoltCommand &)=delete
VoltCommand(const VoltCommand &)=delete
static std::string ReadFile(const std::filesystem::path &path)
Definition Loader.cpp:56