New Response Mechanism

Last night I committed some non-trivial changes to the way the commands are built. The biggest one is that instead of the command returning a string in the doCommand method, you now use an internal method called RESPONSE. This allows for a single command to return more than one response and/or allows the command to send responses to someone other than the person originating the request (though, that is subject, of course, to the nature of the IM service you are using -- most don't allow sending of messages to people not on a buddy list, so the BuddyID associated with the SLIMBot instance would need to be on someone's buddy list for that to work in most cases).

As a result of that, the command API for developers of commands can now be much richer and yet simpler because an instance of a command is now somewhat stateful -- and thus aware of its context (thus, no longer needing to pass the raw CFEVENT into each doCommand call).

I could make it so that you don't even need to pass the input to the command and instead make a getInput method in the baseCommand, but I think that might actually be less simple for people making the most of commands, for whom it might be handy to have the command input available directly in the arguments of the doCommand method. Thoughts on that are welcomed, but since RIAForge isn't letting up do a "release" (And the zip from SVN links isn't active on SLIMBot either!), I doubt anyone out there is actually involved with the code yet.

If a blog post falls in the woods, and nobody is there to read it, does it... you get the idea ;)

Comments
wow gold's Gravatar ://www.mmorpgvip.com
://www.faysale.com
# Posted By wow gold | 3/19/09 3:35 AM
wow gold's Gravatar Best <a href="://www.wowspa.com/wowspa_pl/"> wow power leveling </a> work group has been created for years. No-further thinking, <a href="://www.wowspa.com"> buy wow gold </a> from us, we are the fastest powerleveling in the world. Get cheap <a href="://www.wowspa.com"> wow gold </a> now!
# Posted By wow gold | 4/9/09 10:13 PM
rolex replica's Gravatar ://www.watchgy.com
://www.watchgy.com
# Posted By rolex replica | 5/29/09 1:18 AM
adf's Gravatar 091026103336AM<a href="://www.maplestory-mesos.com/">buy maplestory mesos</a> | <a href="://www.maplestory-mesos.com/">MapleStory mesos</a> | <a href="://www.maplestory-mesos.com/">MapleStory gold</a> | <a href="://www.maplestory-mesos.com/">cheap maplestory mesos</a> |
# Posted By adf | 10/25/09 10:34 PM
VBNCVB's Gravatar 09112111215AM<a href="://www.maplestory-mesos.com/">buy maplestory mesos</a> | <a href="://www.maplestory-mesos.com/">MapleStory mesos</a> | <a href="://www.maplestory-mesos.com/">MapleStory gold</a> | <a href="://www.maplestory-mesos.com/">cheap maplestory mesos</a> |
# Posted By VBNCVB | 11/1/09 10:12 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.5.006. | Protected by Akismet | Blog with WordPress