mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
Enable getting variable values from websocket condition
This commit is contained in:
parent
828a69bbf7
commit
19eb5074f2
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user