diff options
| author | Kitzunu <24550914+Kitzunu@users.noreply.github.com> | 2023-02-20 22:07:26 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-20 22:07:26 +0100 |
| commit | 0c4feb674444210da295751a0c4e5eefb9c771f1 (patch) | |
| tree | 14801993937fe841d7687231f844bc2b74083509 /src/server/database/Database/Implementation | |
| parent | bd7f139bb8861e4c89651017b2371b9fa035a4a5 (diff) | |
refactor(Core/Motd): Move motd from conf to db (#15111)
Diffstat (limited to 'src/server/database/Database/Implementation')
| -rw-r--r-- | src/server/database/Database/Implementation/LoginDatabase.cpp | 2 | ||||
| -rw-r--r-- | src/server/database/Database/Implementation/LoginDatabase.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/server/database/Database/Implementation/LoginDatabase.cpp b/src/server/database/Database/Implementation/LoginDatabase.cpp index 5a393a3cc1..4824309747 100644 --- a/src/server/database/Database/Implementation/LoginDatabase.cpp +++ b/src/server/database/Database/Implementation/LoginDatabase.cpp @@ -114,6 +114,8 @@ void LoginDatabaseConnection::DoPrepareStatements() PrepareStatement(LOGIN_SEL_REALMLIST_SECURITY_LEVEL, "SELECT allowedSecurityLevel from realmlist WHERE id = ?", CONNECTION_SYNCH); PrepareStatement(LOGIN_DEL_ACCOUNT, "DELETE FROM account WHERE id = ?", CONNECTION_ASYNC); PrepareStatement(LOGIN_SEL_AUTOBROADCAST, "SELECT id, weight, text FROM autobroadcast WHERE realmid = ? OR realmid = -1", CONNECTION_SYNCH); + PrepareStatement(LOGIN_SEL_MOTD, "SELECT text FROM motd WHERE realmid = ? OR realmid = -1 ORDER BY realmid DESC", CONNECTION_SYNCH); + PrepareStatement(LOGIN_REP_MOTD, "REPLACE INTO motd (realmid, text) VALUES (?, ?)", CONNECTION_ASYNC); PrepareStatement(LOGIN_INS_ACCOUNT_MUTE, "INSERT INTO account_muted VALUES (?, UNIX_TIMESTAMP(), ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(LOGIN_SEL_ACCOUNT_MUTE_INFO, "SELECT mutedate, mutetime, mutereason, mutedby FROM account_muted WHERE guid = ? ORDER BY mutedate ASC", CONNECTION_SYNCH); PrepareStatement(LOGIN_DEL_ACCOUNT_MUTED, "DELETE FROM account_muted WHERE guid = ?", CONNECTION_ASYNC); diff --git a/src/server/database/Database/Implementation/LoginDatabase.h b/src/server/database/Database/Implementation/LoginDatabase.h index 3a9bb4a823..c7fb2be483 100644 --- a/src/server/database/Database/Implementation/LoginDatabase.h +++ b/src/server/database/Database/Implementation/LoginDatabase.h @@ -96,6 +96,8 @@ enum LoginDatabaseStatements : uint32 LOGIN_SEL_REALMLIST_SECURITY_LEVEL, LOGIN_DEL_ACCOUNT, LOGIN_SEL_AUTOBROADCAST, + LOGIN_SEL_MOTD, + LOGIN_REP_MOTD, LOGIN_SEL_LAST_ATTEMPT_IP, LOGIN_SEL_LAST_IP, LOGIN_INS_ALDL_IP_LOGGING, |
