Sean Corfield has posted an IRC bot gateway for ColdFusion MX 7. This is a really nice example ColdFusion gateway example. And if anyone finds a real use for it I’d love to know. 😉
c’mon in the channel and take it for a ride. kick the tires.
you can slap people with fish.
now tell me there’s no real use for it 🙂
seriously…if you use IRC, a bot in general has uses. sean’s just shown a way to write one in CF, which is nicer than the ‘traditional’ means of PHP or irc scripts.
one nice feature sean added was the ability to type in a CF function or tag name, and have the bot return a URL to livedocs for that tag/function.
(still, don’t discount using a bot to slap a buddy with a trout)
I just refactored it a bit to allow commands to be added/removed/altered at runtime.
So I added a Marvin (paranoid android) quote command. That’s a real use, eh?
I get the impression that Event Gateways are a solution looking for a question.
There are questions, they’re just very specific. For example, when a file gets uploaded or created in a directory (like a log file), you can use event gateways to monitor the total size of that directory, for size restriction reasons, and have it email you when it gets to a critical size.
Charlie, I agree. I was being facetious, and in no way knocking Sean’s effort. While I don’t see myself needing an IRC gateway any time soon, it still serves as a great example of what is doable, and can be a very useful starting point for others wanting to write their own gateways.
Doug, I disagree. I don’t think that everyone needs them, but they do indeed solve real problems for those that do. The asynch gateway is invaluable. As is the directory watcher. And Macromedia.com uses the JMS gateway in production. And there are other examples, too.
Yeah, i knew you were only kidding around.
Sorry, I didn’t use enough smileys 🙂
A couple of useful things that IRC bots do:
* track users so you can find out when someone was last around (helpful if you join a channel and want to know whether someone is active or lurking):
* remember useful stuff to act as a sort of faq for the channel:
!know the url of coldspring is http://coldspringframework.org
!what is the url of coldspring
I’d certainly be interested in hearing suggestions from folks about what really would be useful for the ircbot on #coldfusion!
I’ve posted release 1.1.0 today which involves a fairly major refactoring and incorporation of Joe Rinehart’s command-based extension idea.
I’ve been hastling Sean for this IRC bot and finally he was nice enough to get this thing working under cfmx7 final 🙂
Before he released v1.1.0 I altered the java a bit myself to incorporate a few extra things that I needed for my bot’s functionality.
Oh and Ben.. There are quite some uses for this tool actually. I’m using it as a planning bot. My gaming-clan is always needing 6 players per match and to hunt down everyone if they can play a certain match on a certain date or not is tedious to say the least. This bot is the ultimate planningtool for this. Whenever someone from our clan joins our private irc channel, it logs on to the bot using a simply /msg botname !auth username password command and after that the bot will respond to them. First thing it does when you log on to it is give you a list of matches that are planned and who is available for those matches and who’s not, and after that you can use !addme !addmaybe !addnot commands to set your own availability for the planned matches. Based on a role-system you are permitted to add matches yourself to the calendar or edit the enemy’s information for a certain match or enter a score for a match after it’s been played (or add/delete users to the clan etc..)
Matches with scores will not be shown on irc by the bot anymore but are still in the database to be shown on a website so we have a history of our match-results.
Though it’s not a commercial use (however, gameserver companies could surely use this as an extra service to their customers) it’s very useful for me as clanleader since I don’t have to run around chasing people.