Freenode IRC Library

I’m not sure why, but I felt like writing a little IRC bot. It has been AT LEAST 14 years since I last logged in to IRC and/or wrote an IRC bot. This is not some fancy eggbot, though. Heck, eggbot is now something that uses an Arduino to scribble on actual chicken eggs with markers these days!

I wanted to put this in front of you guys while I keep working on making it easier to use and expanding its list of commands to support Wikipedia’s list of internet relay chat commands. I’m probably going to need to write a command parse/function router to make it all-inclusive.

Right now, it can:

  • Log in
  • Set the nick
    • Continually increment a trailing integer if the nick is taken
  • Join a channel
  • Chat in a channel
  • Respond to IRC pings
  • Leave a channel
  • Quit the service

I’d like to add a “trigger” ability to be able to specify strings to listen for in a channel and respond appropriately. Adding them dynamically with Spark.function() might be rough given the 64-character max length, but longer triggers could be added in user code.

Without further adieu, I present the spark-freenode-bot library!

Ping: @zachary

2 Likes

WOW! Can we arrange a day to test it out?

I’m still not sure if i know fully what it can do but i would love to mess with it @wgbartley :wink:

Right now, not a whole lot. It can do some very basics, but that’s about it. Next step will be to implement the list of IRC commands. After that, I’ll try to figure out a good way to do the triggers.

The original idea came as I logged onto IRC for the first time this millennium and wanted to possibly help support the folks there. I can only use the webchat at work, and I’m a web developer, so the IRC tab got hidden quickly! I was thinking it would be cool to flash an LED whenever there was channel activity. Unfortunately, port 6667 is blocked at work, so I can’t really rely on my idea to work there. :frowning: I still thought it might be helpful for @zachary and all the others who idle on IRC throughout the day.

1 Like

I finally figured out how to get discourse to flag every single post I haven’t read yet, can’t believe I hadn’t seen this one, this is sweet! :slight_smile:

We talked about having a chat bot that sat around and would turn lights on/off for us, or flash when people are chatting in the channel and I’m not around.

Nice! :slight_smile:

Thanks,
David

I never really followed through on implementing the list of IRC commands. Ooops!

no worries, fun idea though! :slight_smile: