mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-15 17:14:07 +00:00
feat: web dashboard and playground work
The NexusDashboard-parity dashboard (dDashboardServer) and everything built on it on the experimental branch: accounts, characters, properties and moderation tools, permissions shared with in-game slash commands, economy reports, World 3D and property 3D views with client scenery, scheduled events (features, vanity changes, live events, announcements, restarts), vanity files and events, the CDClient browser, the message inspector with saved captures, chat filter tools, community challenges, live ops, the AI moderator helper, and the server-side changes they need. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,18 @@ enum class eReplicaComponentType : uint32_t;
|
||||
|
||||
//! The general utils namespace
|
||||
namespace GeneralUtils {
|
||||
// Text for a SQL LIKE pattern with its wildcards (% and _) and the escape character escaped; use with ESCAPE '<escape>'.
|
||||
// '!' works the same in SQLite and MySQL (a backslash in a MySQL string literal depends on the sql_mode).
|
||||
inline std::string LikeEscape(std::string_view text, char escape = '\\') {
|
||||
std::string escaped;
|
||||
escaped.reserve(text.size());
|
||||
for (const char c : text) {
|
||||
if (c == '%' || c == '_' || c == escape) escaped += escape;
|
||||
escaped += c;
|
||||
}
|
||||
return escaped;
|
||||
}
|
||||
|
||||
//! Converts a plain ASCII string to a UTF-16 string
|
||||
/*!
|
||||
\param string The string to convert
|
||||
|
||||
Reference in New Issue
Block a user