1. 16
  1.  

  2. 7

    I’ve made an IRC bot to fend off a particular, peculiar, and dedicated troll (or rather, “idiot”). I went with scores rather than pressure but the idea is the same: there’s a maximum score, each message costs some points (with various tweaks depending on their length, use of capitals, iso8859-1, links, …) and there’s a multiplier depending on hostnames (tor, webchats, open proxies, distance from a given location) along with an initial malus (with the same criteria as just before). When the score for a user goes below 0, a ban is put in place; its duration depends on how far below 0 the score went.

    In practice it works pretty well and can also manage spambots well.

    Code is OCaml with Lwt and React (the OCaml FRP library). It is based on @c-cube calculon IRC bot library. It is unfortunately fugly because there was no specification except the behaviour of the troll at a given moment and changes were done almost live.

    1. 2

      there was no specification except the behaviour of the troll at a given moment and changes were done almost live

      This is agile. :D

    2. 2

      I have a feeling this is one of those things where machine learning could help a lot. I like the simplicity of your pressure model, though. Covers a lot of situations with better efficiency than ML would have.