Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
auto responder
#2
I loved this request! I don't have BBot here, but I believe the final macro will be similar to this:

Outdated, new version below!
[macro]1 {Anti Bot Responder} Str.Set(AntiBotMessagePattern, ^\\[Sistema Anti-Bot\\].*: \(.*?\)$) When.SystemMessage(WhenReceivedAntiBotMessage, !AntiBotMessagePattern) Exit() {WhenReceivedAntiBotMessage} Self.Say(\!r !Str.Match.1)[/macro]

This regex can be seen here: https://regex101.com/r/45XrhL/1
As you can see, this regex will match a system message similar to the one you describe, it uses a (matching group) to capture anything after the : symbol. Then, it will simply Self.Say(...) that match.

Note: the Macro Engine requires several escaping of the regex (adding \ before some characters), because the regex contains some special symbols that BBot also recognizes. Escaping them makes them normal characters Smile
Reply


Messages In This Thread
auto responder - by paradex - 09-24-2018, 11:14 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)