From a806758fad8547600152fcd52a479828e043cb5a Mon Sep 17 00:00:00 2001 From: Ulu Kyn Date: Mon, 7 Oct 2019 12:27:59 +0200 Subject: [PATCH] Added: brodcast messages can now trigger lua code --HG-- branch : ark --- code/ryzom/client/src/interface_v3/interface_manager.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index 16377ac94..1f61e5e39 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -2513,6 +2513,14 @@ void CInterfaceManager::displaySystemInfo(const ucstring &str, const string &cat CClientConfig::SSysInfoParam::TMode mode = CClientConfig::SSysInfoParam::Normal; CRGBA color = CRGBA::White; + // If broadcast, parse lua code + if (toLower(cat) == "bc" && str.size() > 3 && str[0]=='@' && str[1]=='L' && str[2]=='U' && str[3]=='A') + { + string code = str.substr(4, str.size()-4).toString(); + if (!code.empty()) + CLuaManager::getInstance().executeLuaScript(code); + return; + } map::const_iterator it = ClientCfg.SystemInfoParams.find(toLower(cat)); if (it != ClientCfg.SystemInfoParams.end()) @@ -2543,6 +2551,7 @@ void CInterfaceManager::displaySystemInfo(const ucstring &str, const string &cat else if ( (mode == CClientConfig::SSysInfoParam::Around || mode == CClientConfig::SSysInfoParam::CenterAround) && PeopleInterraction.AroundMe.Window) PeopleInterraction.ChatInput.AroundMe.displayMessage(str, color, 2); + } // ***************************************************************************