mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 17:51:28 +00:00
* [Languages] Cleanup languages constants # Notes - Cleanup formatting and logic where necessary. - Cleaned up constants to use a namespace with `constexpr` instead. - Changed `LoadCharacterLanguages` to use a repository instead. * Lua GroupMessage uint8/language_id * Lua More uint8/language_id
21 lines
596 B
C++
Executable File
21 lines
596 B
C++
Executable File
#include "../client.h"
|
|
#include "../worldserver.h"
|
|
|
|
extern WorldServer worldserver;
|
|
|
|
void command_chat(Client *c, const Seperator *sep)
|
|
{
|
|
auto arguments = sep->argnum;
|
|
if (arguments < 2 || !sep->IsNumber(1)) {
|
|
c->Message(Chat::White, "Usage: #chat [Channel ID] [Message]");
|
|
return;
|
|
}
|
|
|
|
auto channel_id = static_cast<uint8>(Strings::ToUnsignedInt(sep->arg[1]));
|
|
std::string message = sep->argplus[2];
|
|
if (!worldserver.SendChannelMessage(0, 0, channel_id, 0, Language::CommonTongue, Language::MaxValue, message.c_str())) {
|
|
c->Message(Chat::White, "World server is disconnected.");
|
|
}
|
|
}
|
|
|