I haven't had a chance to see if your fix works, but I found a work around that may help others.
I'm connecting behind a firewall that dropped the ident request from the IRC server. I changed my firewall rule to reject ident rather drop it, and I'm able to connect to IRC very quickly now.
The suggestion to install identd was something I had gotten also, but of course, being behind a firewall doing NAT, the address seen by the IRC server wasn't mine, but the firewall, thus the reason that I looked into modifing the firewall.
David