Hi!

I've done it before using Perl, here's some doc:

mIRC's /help sockets

http://www.venkydude.com/articles/yahoo.htm
http://www.cse.iitb.ac.in/~varunk/YahooProtocol.htm
http://libyahoo2.sourceforge.net/ymsg-9.txt
freshmeat.net > search for Yahoo clients sources.

I don't know if these pages have been updated since Yahoo! has changed his protocol.

Server is scs.msg.yahoo.com port 5050.

The best way is to reverse engineer: I recommend you a packed sniffer like Ethereal, WinDump (tcpdump for Windows). Open a Yahoo! session and dump everything received and sent. It will help you to understand (remember, everything is in hexadecimal).

Good luck.