No problem, my scripting crew covered this topic awhile ago back in 2000. It still relevant. We mimic identd using sockets through a mIRC script, but you can do it through any language.
The process is relatively straight forward. The server sends you a message on port 113 (typical identd server for chat networks). So setup a socket listening on this port. It sends you two port numbers. You then have to respond by reversing the port numbers, specify a Response Type, System, and Identity as well.
So for example the server sends you
1234, 6667 and you will respond with
6667 , 1234 : USERID : UNIX : nickname. For compatibility across most networks, keep the nickname to 10 or less characters. Not all servers support long nicknames.
Notice in our response that the ports are reversed, we have specified a user id of UNIX and then a nickname we wish to ident with.
Good luck!