It can be done I have a bot that will do all that from irc accept the send a message to the server does not seem to work. I am still trying to work why it wont.
It all involves using sockets and parsing. I would like it if someone could work out how to parse the mplog so you could have all chat relayed back to irc.