- Added !CommandMeasure bang. Instead of '!PluginBang "MeasureName Arguments' use '!CommandMeasure "MeasureName" "Arguments"'.

- Script: The !CommandMeasure argument must now be Lua code. For example:
!CommandMeasure "MeasureLuaScript" "someVar = 'hello'"
!CommandMeasure "MeasureLuaScript" "SomeFunc()"
This commit is contained in:
Birunthan Mohanathas
2011-07-09 09:23:28 +00:00
parent c2e3b6292d
commit f0fbc0f145
7 changed files with 82 additions and 20 deletions

View File

@@ -242,18 +242,8 @@ void CMeasureScript::ReadConfig(CConfigParser& parser, const WCHAR* section)
*/
void CMeasureScript::ExecuteBang(const WCHAR* args)
{
std::string function = ConvertToAscii(args);
if (m_LuaScript->IsFunction(function.c_str()))
{
m_LuaScript->RunFunction(function.c_str());
}
else
{
std::wstring error = L"Script: Function \"";
error += args;
error += L"\" does not exist.";
}
std::string str = ConvertToAscii(args);
m_LuaScript->RunString(str.c_str());
}
static void stackDump(lua_State *L)