mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-20 00:05:41 -05:00
Enable getting variable values from websocket condition
This commit is contained in:
@@ -56,14 +56,17 @@ bool MacroConditionWebsocket::CheckCondition()
|
||||
for (const auto &msg : *messages) {
|
||||
if (_regex.Enabled()) {
|
||||
if (matchRegex(_regex, msg, _message)) {
|
||||
SetVariableValue(msg);
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (msg == std::string(_message)) {
|
||||
SetVariableValue(msg);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
SetVariableValue("");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
class MacroConditionWebsocket : public MacroCondition {
|
||||
public:
|
||||
MacroConditionWebsocket(Macro *m) : MacroCondition(m) {}
|
||||
MacroConditionWebsocket(Macro *m) : MacroCondition(m, true) {}
|
||||
bool CheckCondition();
|
||||
bool Save(obs_data_t *obj) const;
|
||||
bool Load(obs_data_t *obj);
|
||||
|
||||
Reference in New Issue
Block a user