Hive13 IRC Bot: Difference between revisions

From Hive13 Wiki
Jump to navigation Jump to search
Line 22: Line 22:

=== Contributors ===
=== Contributors ===
* [[cjdavis]]
* Add yourself here if you have contributed to this project.
* Add yourself here if you have contributed to this project.

Revision as of 01:01, 11 June 2011

Property "ProjectImage" (as page type) with input value "Image:IRSSI.png|240px" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process.

Hive13 Project
Hive13 IRC Bot
Status: Active
Start Date: 6/14/2010



For a while now I have been meaning to work on an IRC bot for the Hive13 IRC room hosted on (Webchat Link).

As of this moment the bot is live in the channel (HiveBot). He is logging the channel to a search-able MySQL database and publishing alerts as various Hive13 related RSS feeds are updated.

The channel log can be found at:

Source code is currently located in an SVN repository hosted by Google Code . It is currently implemented as an Eclipse project. I currently have the project set up so that people can check out the code, but check-ins are disallowed unless you have an account. Until we move the code to a more appropriate location anyone that wants to commit changes can contact me and I (Paul) will add you to the correct user group.

Most of the initial goals have been met (Channel logging, tie the various communication mediums together, extensible framework) and I will be start work on some of the more longtime goals (Google calendar integration, Auto-opping group members)

Project Manager


  • cjdavis
  • Add yourself here if you have contributed to this project.

Project Status

User:Paul has the bot in a state where it is currently active in the #hive13 channel on


  • Channel Logging
    • The bot logs all events in the channel to
    • The logs can be searched for keywords.
    • The logs page can show all messages since a user was last seen in the channel.
  • Maintains a list of authorized users at multiples levels (Unauthorized, Known, Operator, Admin)
    • When a user joins the channel the bot checks that user against a list of users and will then give them the appropriate authorization level.
    • If a user is on the 'Op' or 'Admin' list they will be given channel operator status.
    • The 'Known' list is currently not fully implemented but would be used to give users voice in channel.
    • The commands users can run is determined by their Authorization level. For instance, an Unauthorized users can not use the !Op command to give other users operator status.
    • A users identity is verified by checking their nickname against the nickserv and a whitelist of nicknames. If the nickserv reports back that the nickname is registered to a whitelisted user, and that user is currently logged in, then they are given the correct Authorization Level.
  • Shortens URL's pasted into the channel and determines the target pages title.
  • Can be subscribed to RSS feeds, then when a new item is published in that feed it will alert the channel to that event.
    • This is a very, very flexible command. The bot can be subscribed to any valid RSS feed and then the message it posts to the channel during an alert is completely configurable.
    • Currently the bot is subscribed to the following sites for Hive13 related content.
      • This wiki's edit feed
      • The Hive13 blog
      • The Hive13 tag on Flickr
      • The Hive13 Mailing list
      • Any post containing 'Hive13' on twitter.
  • Tell command
    • Ex. !Tell Username This message will be delivered when Username is next seen talking in chat.
  • Time command
    • Displays the current time
    • AuthLevel: Unauthorized
  • Quit Command
    • Shuts the bot down
    • AuthLevel: Admin
  • Op Command
    • Has two functions:
      1. An Unauthorized user who runs the command has their credentials rechecked.
        • Ex. !op
      2. An Authorized user can give other users an Operator Authlevel, this requires Operator AuthLevel.
        • Ex. !op Username
  • Plugin List command
    • Returns a list of commands that the running user is authorized to execute.
    • Ex. !plugins

Command Types

"Passive" commands have their framework completed, these are commands that only respond to user input on the channels. For example, "!time" will activate the 'time' command which spits out the current time.

"Threaded" commands have most of their framework completed, but are still being investigated. These are commands that respond to external data and provide updates to the channel. For example, an RssReader that publishes updates to Hive13 related content to the channel.

"LineParse" commands are essentially "Passive" commands that parse every line that passes through the chat room and respond to them in some way. An example of this would be the "Linkify" command that searches every chat line for website links and generates short URL's and finds the page's title.

What Needs to be Done

  • Research the feasibility of various ideas mentioned below.
    • Google Calendar API
      • The Google Calendar API is a PITA. I am still looking into it but what I mainly want is a simple way to say, "Are there any events happening in the next X days" and if the answer is yes, I just want the Date, Time and Name of that event. However the list I have gotten so far is a list of all events ever scheduled on the Hive13 calendar in no particular order and "Repeating" events are given no times.
  • Maintain an easily extensible design for the actual bot.
  • Hammer out what all features people might like to see.
  • Implement ChannelStats
  • Implement Seen
    • Aka, when was a user last seen in channel.
  • RSS Feed Aggregation
  • Flesh out the config file for loading // configuring plugins
  • Formatted log messages

Project Needs

Project Information


IRC Task Automater

  1. Automatically give operator status to Hive13 members who join the IRC room.
    • *Implemented* - Users must be authenticated w/ NickServ first.

Communication Aggregator


A bot would enable us to better tie the chat room into the other communication mediums we use as a group. As it stands now we are fractured into 3 major communication groups:

  1. Mailing List *Implemented*
  2. IRC Room (That is where we are, duh)
  3. Meetings *Implemented* (Through the wiki updates)

With numerous less utilized mediums:

  • Twitter *Implemented*
  • Youtube *Implemented*
  • Flickr *Implemented*
  • Google Calendar *Implemented*
  • Hive13 Blog *Implemented*
  • Hive13 Wiki *Implemented*

There are of course people that utilize all of these communications mediums, but there are also people that tends to stick to only one or two of them. The bot could help tie the other communication mediums into the IRC room while also tieing the chat room back into the communication loop.


  • Automate alerting other people when someone says they are going to be at the hackerspace.
    • Ex. User123 says, "I am going to be @hive13 in about an hour", Hive13Bot uses the Twitter API to send out a tweet stating: User13 said 'I am going to be @hvie13 in about an hour'

Virtual to Physical Communication

We have the Pro-Lite Display display at the hackerspace as well has the GoldenTee Display. I would love to create something that ties these physical displays into a communication medium between the IRC chat room and the hackerspace. This way we can address messages from the chat room to the physical hackerspace.

For instance, if someone in the #hive13 chat room were to send:

  • !hive13 Hey, is anyone there?

An alert would sound in the hackerspace and the message would start scrolling on the displays. There would be a kiosk computer set up near the display, or the maybe just a keyboard hooked up to a uC, that would allow that person at the hackerspace to respond.

Physical to Virtual Alerts

This has already been implemented and has been tied to the Hackerspace Open Switch project. This is only a 1-way communication and works via a generated RSS feed:


This section is documenting research that has been done on the various goals. It will have links to additional information if needed.

IRC Automation Research

Auto-Opping Users on Freenode

The simplest way to implement this would be to just have a list of usernames, then when a new user joins a channel, or when the bot joins the channel, simply run through the list of usernames giving each one operator status. However, a major problem with this is that as soon as someone realizes that this is how the bot works, they can just join the channel, set their nick to a members username and receive operator status. allows users to register usernames and then login with those usernames. If we can find a way to easily confirm that each user is genuinely that user prior to sending the op command, then it would greatly enhance the security of this operation. A quick Google search turns up the following: . This page hints at using something called 'CAPAB IDENTIFY-MSG'. I have yet to determine exactly what this is or how we can use it. The section also links to a perl script, but I do not quite understand what the script is doing.

After some further research I found that if you message the nickserv bot it will tell you if a certain user is logged in or not. For example, '/msg nickserv info pvince' returns several messages that consist of a variety of information, if the user is logged in the "Last seen:" row says 'Now' if they are not logged in, there is a date.

Communication Aggregation Research

@Hive13 Alerts

RSS Feed Alerts

Google Calendar Topic Updates