I've been rewriting jar for a bit now as a modular bot -- it seems like the biggest problem with IRC bots is that debugging them requires lots of join/parts.
I started to write it with perl threads. I'd had good experiences writing with perl threads in the past and used them to write an mp3 stream for myself. What I hadn't done was looked into how they're implemented. Each instance starts up a separate interpreter for execution.
I eventually got it working to my satisfaction, but in disgust, I've started writing one which does a fork()/exec() and communicates by way of a named pipe.
It ain't pretty, but at least it's something!