With some code snippets from several sources and a bit of time later, I came up with an AppleScript application that acts as a command line interpreter for iChat. Using this program, you can select a user to "allow" messages from. When iChat receives an IM from this user, it looks to see if it's one of a few custom commands, if not it tries to run the message as an AppleScript. If that fails, it passes it to the UNIX command line.
In the case of my original proposition, sending ifconfig in the IM will return the current IP address of my computer. Here are a few other possibilities from the Read Me:
- date: shows the current date
- ifconfig: gives network status, including current IP address(es)
- whoami: shows the currently logged on user
- say "message": your computer will say this message
- uptime: shows your computer's uptime
[robg adds: I tested this, and it seemed to work as described, though it's a bit strange to receive responses back from a ghost iChat session! The only one that didn't work for me was date, which just returned the word 'date.' Note that certain commands, such as rm, are disabled. The source is also available, in case you'd like to see exactly what's going on. And yes, I realize there's potentially a security concern here, with iChat passing messages to AppleScript and/or the Terminal. But since you have to install and run the app locally, I think it's a mild risk, and there are some useful things that can be done with this app.]

