Reused Zeroname code, and swapped out the reolveDomain function. It now connects to namecoind directly using RPC and then run rpc.name_show() to find domain.