• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Halibot / halibot / 434
93%
master: 93%

Build:
Build:
LAST BUILD BRANCH: config-writer
DEFAULT BRANCH: master
Ran 08 Mar 2019 08:19PM UTC
Jobs 2
Files 20
Run time 21min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
434

push

travis-ci

richteer
halibot: implement filters as new halibot object type

Problem: How can we introduce rate limiting, self-censoring, or other kind of
logic into Halibot instances without adding this to each module or agent?

This patch introduces a new Halibot object type "HalFilter". These filters can
be inserted in between a normal message send path, to silently drop or modify
message content. These filters are NOT meant for large behaviors.

Filters are instantiated similarly to other HalObjects, using the
"filter-instances" config key. To "attach" a filter to an agent or module, a
new filter table needs to be defined in config.json.

Here is an example:

"filters": {
    "inbound": {
      "irc0": [ "rlfilter0" ]
    },

    "outbound": {
      "quote0": [ "rlfilter1" ]
    }
}

In this example, "rlfilter0" and "rlfilter1" are instances of a rate-limiting
filter. The above declaration states that all messages from any source being
sent to irc0 must first pass through rlfilter0. Also, any messages flowing out
from module quote0 must first pass through rlfilter1.

As rlfilter0 and rlfilter1 are different instances, they may have different
tolerances for their rate limiter. So, for example, this could restrict the
amount of spam coming from one particular module more strictly than all
messages flowing to an agent.

1137 of 1218 relevant lines covered (93.35%)

1.87 hits per line

Jobs
ID Job ID Ran Files Coverage
1 434.1 08 Mar 2019 08:40PM UTC 0
93.35
Travis Job 434.1
2 434.2 08 Mar 2019 08:41PM UTC 0
93.35
Travis Job 434.2
Source Files on build 434
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #434
  • c48d22a9 on github
  • Prev Build on filter-ri-injection (#416)
  • Next Build on filter-ri-injection (#441)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc