Skip to content
caller9 edited this page Sep 14, 2010 · 9 revisions

PyReferee – IRC Referee Chat Bot

Where defaults are set in the description of actions below they will be enclosed in ().

Currently the IRC_Flood class will watch the channel and when a nick sends more than X(10) messages in Y(60) seconds they receive a “yellow card.” This is accompanied by a message template sent to the channel and an action template taken against the user(+q for 60 seconds.) Once they exceed a configurable yellow card limit(3) within a period of configurable days(7) they are given a red card. This is also accompanied by a message template and an action template (+q for 4 hours.) Once they exceed their red card limit(3) within a period of configurable days(30) the “permaban” action is taken. The default is to set +b. The difference with the permaban option is that there is no timer thread that will come around to revoke the +b. Unbanning requires human intervention by design so that people testing the system or serious repeat offenders can have time to marinate on their deeds until an op shows up to review their behavior and take appropriate action, or not.

The IRC_Enforcer will parse templates for both messages and actions on yellow, red, and permanent actions. So the actions and messages for each could be whatever the admin desires. These can be customized on a per-channel basis.

Current Features:

  • Connect to multiple servers with multiple threads
  • Join multiple channels on each server
  • Identify administrators by host information on a per channel basis. (Preferably NickServe registered mask)
  • Per channel configuration for parsers
  • Can run any n parser classes that implement parse_message and/or parse_command.
  • Parser plugins can callback the IRC_Channel object to hand out yellow, red, or permaban actions. Enforcer will handle escalation for yellow/red cards automatically. While the parser can jump straight to permaban, generally the parser will call yellow and allow Enforcer to escalate.
  • Admins are excluded from enforcement.
  • Bot can identify to nickserv after connection is made and “001” welcome is received.
  • Users can type “BOT_NICK cards” in the channel to receive their current count of yellow/red cards.
  • Reply to CTCP Version request
  • IRC_Enforcer admin command to reduce or clear cards for a nick

TODO:

Priority 2

  • Allow existing admin to modify admin list while running
  • Configuration file directive of immutable admin status for some admins
  • Reload configuration files while running
  • Option to automatically +o admins in a channel where bot is operator
  • Command to +o/-o admins on demand

Priority 3

  • Allow IRC_Flood parser config to be modified by admin in the channel while running

Changelog:

  • v0.20 – nearly complete refactor of card system in IRC_Enforcer/IRC_Nick as well as configuration file change to accommodate. New Card class to contain configuration data.
Clone this wiki locally