CS2-Kit
C++23 library for CS2 Metamod:Source plugin development
Loading...
Searching...
No Matches
Command.cpp
Go to the documentation of this file.
1#include <CS2Kit/Commands/Command.hpp>
2#include <CS2Kit/Utils/StringUtils.hpp>
3
5{
6
7using namespace CS2Kit::Utils;
8
9bool Command::Matches(const std::string& cmd) const
10{
11 auto lower = StringUtils::ToLower(cmd);
12 if (StringUtils::ToLower(Name) == lower)
13 return true;
14 for (const auto& alias : Aliases)
15 {
16 if (StringUtils::ToLower(alias) == lower)
17 return true;
18 }
19 return false;
20}
21
22} // namespace CS2Kit::Commands