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

Halibot / halibot / 416
93%
master: 93%

Build:
Build:
LAST BUILD BRANCH: config-writer
DEFAULT BRANCH: master
Ran 05 Mar 2019 11:43PM UTC
Jobs 1
Files 20
Run time 4016min
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
416

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.

1135 of 1214 relevant lines covered (93.49%)

0.93 hits per line

Jobs
ID Job ID Ran Files Coverage
2 416.2 08 Mar 2019 06:39PM UTC 0
93.49
Travis Job 416.2
Source Files on build 416
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #416
  • ce7d9590 on github
  • Prev Build on filter-ri-injection (#411)
  • Next Build on filter-ri-injection (#434)
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