Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


IRC Javascript Evaluator Example
Just a simple example of using camel to receive a message from an irc based endpoint, route it through the appropriate scripting engine and send the result back to the irc endpoint. 

Requires JAVA_HOME to be set to a java6 SDK. Won't work on anything else because I wrote this quick and on the fly just to learn camel.

From the command line type 
 mvn compile exec:java -Dexec.mainClass=org.jamescarr.camel.Main

By default it creates a bot named lang-bot and drops it in #botwar on To test it, join and type

?js [some javascript snippet]
?rb [some ruby snippet]

for example:
?js (function(n){ return n==1?n:n*arguments.callee(n-1)})(5)

Under The Hood
If you want to see all the camel magic used for this example, take a peek at (where you can also specify the name for the bot as well). The spring configuration (irc-example.xml) is purposefully kept small and only contains the camelContext (so spring can manage it) and references to the script engines used (Because I don't know how to do it otherwise).

Have fun!
You can’t perform that action at this time.