IRC bot written as a PostgreSQL background worker