mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-01 23:35:41 +00:00
CMake: remove __linux completely
This commit is contained in:
parent
8f77f1c8c0
commit
c3151093e2
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user