!752 concepts. !include #1005284 // User's Name, Concepts concept LThatsNotMyName extends LineIdea {} p { loadConceptsFrom("#1005282"); Dialog d = dialog(); L lines = d.lines; for i over lines: { Line line = d.lines.get(i); if (line !instanceof UserLine) continue; UserLine ul = cast line; BotLine bl = optCast(BotLine, get(lines, i-1)); LineIdea botIdea = bl == null ? null : bl.idea.get(); new Matches m; S s = line.text; if "das ist nicht mein name" { interpret(ul, unique(LThatsNotMyName)); } if (ul.idea.get() instanceof LThatsNotMyName && botIdea instanceof LGreet) pcall { UserName u = ((LGreet) botIdea).userName.get(); if (u.usable) { print(quote(u.name) + " seems to be a bad name, marking not usable"); cset(u, "usable", false); } } } saveConceptsBack(); } svoid interpret(UserLine line, LineIdea idea) { if (eq(line.idea.get(), idea)) ret; bool had = line.idea.has(); line.idea.set(idea); print("Line " + quote(line.text) + " " + (had ? "re-" : "") + "interpreted as " + shortDynamicClassName(idea)); }