An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View

IRCBot Event Gateway Now Available!

November 22, 2005 ·

I started this project over a year ago (when CFMX 7 was in alpha testing) but never updated it to run on the final release. Ron Pasch badgered me today to finish the project and release it (thank you Ron!). You can download it from the software pod on my blog. IRCBot uses PircBot by Paul Mutton and includes release 1.4.0 for your convenience. It might well work with the latest release of PircBot (1.4.4) but I haven't tried it. Paul's done a great job: PircBot is very full-featured and it made it trivial for me to build an event gateway that enables you to write IRC channel bots in ColdFusion! You can see a version of the bot in action on the #coldfusion channel on - join the channel and type !help and the bot will send you private messages explaining how to interact with it. The bot will be online when I'm online - it runs on my laptop. I keep enhancing it so expect it to grow in functionality over time...
Just a quick note: many IRC servers do not allow multiple connections from the same IP address so if you try to run the bot on your localhost setup, you may not be able to connect using your regular IRC client at the same time. One possible workaround, if the IRC system you use has a cluster of servers (like is to tell the bot to connect to a different server than the one your IRC client uses!

Tags: coldfusion

19 responses

  • 1 Damon Cooper // Nov 22, 2005 at 3:20 PM

    Sweet! Nice work!
  • 2 João Fernandes // Nov 22, 2005 at 3:32 PM

    You're the MAN !
    I tought we would never get the missing gateway ;)

    Thanks (also to Ron)!
  • 3 Ryan Guill // Nov 22, 2005 at 6:26 PM

    IRC is one thing I didn't get into on my rise to geekdom, so could someone tell me how to connect to I tried using chatzilla and it keeps refusing the connection...
  • 4 Critter // Nov 22, 2005 at 7:21 PM


    i'll have a gander at the pirchbot stuff, but thought i would ask here as well.

    not really wanting to expose the ip of my server on IRC (i'm sure you can understand..) is there a way to specify a l/p for the bot, so that i can log it into a bnc?
  • 5 Ron Pasch // Nov 23, 2005 at 12:23 AM

    Just had to keep bugging him, that's all ;-)

    No really sean, Thx sooo much for this one!
  • 6 Adedeji Olowe // Nov 23, 2005 at 2:12 AM

    Sean, good job.

    When should we be expecting something for AOL/Yahoo/MSN?

    I guess am Oliver Twist, I always want some more.
  • 7 Critter // Nov 23, 2005 at 3:55 AM

    @ Adedeji

    have a gander at ben forta's blog, he documents the steps for creating IMBots there...
  • 8 Sean Corfield // Nov 23, 2005 at 9:46 AM

    Ryan, look at the self-help on or use a different chat client.

    Critter, no idea. You'd have to dig around in the PircBot source and probably modify the bot left, right and center.

    Note to all: I will not under any circumstances provide any support for source builds of this bot. If you want to mess with it, beyond just editing the CFC and the cfg file, you are completely and utterly on your own. Why? Because there are two many variables in your Java knowledge and your Java development environment for me to provide remote help. I will entertain specific requests for enhancments to the bot gateway which I may incorporate into the Java code but I will not help anyone trying to build it themselves. Sorry but life is just too short for that!
  • 9 Critter // Nov 23, 2005 at 9:50 AM

    no worries mate. i'll give it all a gander. thanks for the start.
  • 10 fluffy bananachunks // Nov 23, 2005 at 1:54 PM

    Sorry if this is easy schmeasy, but I haven't been able to figure it out: I just want to be able to pass messages to the bot (from a CFML template or the like) to message into a channel. I've had no problems with using sendGatewayMessage with the IM bots, but haven't been able to do the same with the ircbot. Any hints, ideas, or urls?

  • 11 Sean Corfield // Nov 25, 2005 at 1:21 PM

    Geo, I'll have to think about that... I'll try to post an example when I've figured it out...
  • 12 Sean Corfield // Nov 25, 2005 at 1:30 PM

    Geo, seen the next blog entry about this...
  • 13 Rick Root // Feb 17, 2006 at 8:11 PM

    Sean, this is pretty cool.

    I wonder if I could use it to turn my new cfajaxchat into a web-based IRC gateway.

    I've already had a couple people suggest that.
  • 14 Sean Corfield // Feb 18, 2006 at 5:49 PM

    Rick, probably. I currently have a GTalk event gateway communicating with the IRC gateway. I blogged about it recently. Someone else (Doug? Joe?) blogged the simple way to make it work so you don't need the full blown bot to do it.
  • 15 Gary Funk // Apr 18, 2006 at 12:19 PM

    Has anyone been able to get this to work with I haven't been able to so far.
  • 16 alessandro prox // Jun 19, 2009 at 1:53 AM

    Any idea how to make it connect to to a port thats not 6667? i need to do this to circumvent some braindead routing; using serverip:serverport didnt seem to work.

    thanks for the awesome work
  • 17 Sean Corfield // Jun 19, 2009 at 3:00 PM

    @alessandro, you'll probably have to look at the PircBot docs for that.
  • 18 Gambit // May 21, 2010 at 7:19 PM

    This is awesome but for one complaint:

    Why didn't you expose all of pircbot's methods to the cfc's? As far as I know there's no way for us to do things like joinChannel() and such without editing the java files.
  • 19 Sean Corfield // May 21, 2010 at 7:50 PM

    @Gambit, I exposed only what I needed to create an IRC bot for a single channel. But it's open source so others can extend it (and several have).

    However, keep your eyes on this blog as I'll be creating a new IRC event gateway for Railo 3.2 and the entire gateway will be written in CFML - no Java required for Railo event gateways.