CMake: remove __linux completely

This commit is contained in:
Lion Kortlepel 2021-11-29 01:42:23 +01:00
parent 8f77f1c8c0
commit c3151093e2
No known key found for this signature in database
GPG Key ID: 4322FF2B4C71259B
3 changed files with 16 additions and 1 deletions

View File

@ -24,7 +24,6 @@ if(APPLE)
include_directories(/usr/local/opt/openssl@1.1/include)
link_directories(/usr/local/Cellar/lua@5.3/5.3.6/lib)
link_directories(/usr/local/opt/openssl@1.1/lib)
add_compile_definitions(__linux)
endif()
if (WIN32)

View File

@ -26,6 +26,7 @@ private:
void Command_Help(const std::string& cmd);
void Command_Kick(const std::string& cmd);
void Command_Say(const std::string& cmd);
void Command_List(const std::string& cmd);
Commandline mCommandline;
std::vector<std::string> mCachedLuaHistory;

View File

@ -185,6 +185,21 @@ void TConsole::Command_Kick(const std::string& cmd) {
}
void TConsole::Command_Say(const std::string& cmd) {
if (cmd.size() > 3) {
auto Message = cmd.substr(4);
LuaAPI::MP::SendChatMessage(-1, Message);
}
}
void TConsole::Command_List(const std::string& cmd) {
std::stringstream ss;
mLuaEngine->Server().ForEachClient([&](std::weak_ptr<TClient> Client) -> bool {
if (!Client.expired()) {
auto locked = Client.lock();
ss <<
}
return true;
});
}
void TConsole::RunAsCommand(const std::string& cmd, bool IgnoreNotACommand) {