[Commands] Cleanup #rules Command. (#2593)

* [Commands] Cleanup #rules Command.

- Cleanup messages and logic.
- Rewrite all rules logic to use `std::string` and repositories.

* References

* Update rules.cpp

* Strings::Equal and Strings::EqualFold.

* Cleanup.

* Update rulesys.cpp

* Update rulesys.cpp

Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
Alex King
2022-12-10 18:08:55 -05:00
committed by GitHub
parent 3872555332
commit b1c4e7c23f
10 changed files with 926 additions and 632 deletions
+2
View File
@@ -110,6 +110,8 @@ public:
static std::vector<std::string> Wrap(std::vector<std::string> &src, std::string character);
static void FindReplace(std::string &string_subject, const std::string &search_string, const std::string &replace_string);
static uint32 TimeToSeconds(std::string time_string);
static bool ToBool(std::string bool_string);
static inline bool EqualFold(const std::string &string_one, const std::string &string_two) { return strcasecmp(string_one.c_str(), string_two.c_str()) == 0; }
template<typename T>
static std::string