diff options
| author | Kitzunu <24550914+Kitzunu@users.noreply.github.com> | 2024-08-09 01:12:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-08 20:12:33 -0300 |
| commit | bb7765d91e8568c479c5cec84948a6015ba29f2e (patch) | |
| tree | 7bdc517c8425ff1cd350cc742f7c989ed332de95 /src/server/scripts/Commands | |
| parent | fdd8ff6e04814a1b624cd1ff18093a2c9acaf47c (diff) | |
refactor(Core/World): Move SendGMText to ChatHandler and allow `fmt` (#19490)
* refactor(Core/World): Move SendGMText to WorldSession and allow `fmt`
- Move SendGMText from World to WorldSession
- Make SendGMText use fmt
- Make SendGMText parse acore_string entries
* Update cs_message.cpp
* tokenize the string only once
* Move to chathandler
* Update WorldSession.cpp
* make sure we have a session
Diffstat (limited to 'src/server/scripts/Commands')
| -rw-r--r-- | src/server/scripts/Commands/cs_message.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/scripts/Commands/cs_message.cpp b/src/server/scripts/Commands/cs_message.cpp index f2ef607523..dd42ce23da 100644 --- a/src/server/scripts/Commands/cs_message.cpp +++ b/src/server/scripts/Commands/cs_message.cpp @@ -77,7 +77,7 @@ public: if (WorldSession* session = handler->GetSession()) name = session->GetPlayer()->GetName(); - sWorld->SendGMText(LANG_GM_ANNOUNCE_COLOR, name.c_str(), message.data()); + handler->SendGMText(LANG_GM_ANNOUNCE_COLOR, name, message.data()); return true; } @@ -92,12 +92,12 @@ public: } // announce to logged in GMs - static bool HandleGMAnnounceCommand(ChatHandler* /*handler*/, Tail message) + static bool HandleGMAnnounceCommand(ChatHandler* handler, Tail message) { if (message.empty()) return false; - sWorld->SendGMText(LANG_GM_BROADCAST, message.data()); + handler->SendGMText(LANG_GM_BROADCAST, message.data()); return true; } |
