Warning: session_start(): open(/var/lib/php/sessions/sess_mejsd8nekf8p4ghmq9re117mo4, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
static S ctxFindRuleForInput() {
CtxContext ctx = ctxContext();
WoodyRule activeRule = woodyBot().getRule(ctx.activeRule);
WoodyBot bot = woodyBot();
print("ctxFindRuleForInput analyzer: " + ctx.activeAnalyzer);
if (ctx.activeAnalyzer != null) {
bool x = ctxProcessRule(ctx.activeAnalyzer);
print(" -> " + (x ? ctx.nextRule : "no match"));
if (x)
ret ctx.nextRule;
}
if (activeRule != null) {
print("Active rule: " + activeRule.fullName);
WoodyRule analyzer = bot.getRule(activeRule.properties.get("ANALYZER"));
print("Analyzer: " + getOpt(analyzer, "fullName"));
if (analyzer != null) {
// TODO
}
try answer ctxFindRuleForInput_default();
ret activeRule.fullName;
}
ret ctxFindRuleForInput_default();
}
sS ctxFindRuleForInput_default() {
new L matchingRules;
for (WoodyRule rule : woodyOnRules(woodyBot()))
if (rule.parsedCondition != null && rule.parsedCondition.get()) {
//print("Matching: " + rule.fullName);
matchingRules.add(rule);
}
if (empty(matchingRules)) null;
if (l(matchingRules) > 1)
print("Have multiple matching rules, picking " + first(matchingRules).fullName + " over " + collect('fullName, dropFirst(matchingRules)));
ret first(matchingRules).fullName;
}