formatWhois: fix error and restore formatting changes lost in supybot merge
formatWhois: fix error and restore formatting changes lost in supybot merge

This reapplies content from commits 2b324203e7701ac1dd83e9879de2543e348f1499, 2628dc03c4743578f2b8e7320b7b4f5e4e715167, ef9fbc4a07db1c18ea5d805f0b4770cc17b152d8,
41effcea13b4a5831dd80835f47829027b39f19f, and 5f23855d278ad4d5527c90cc4000b2c2eddef971.

Ban3/Limnoria,Ban3/Limnoria,ProgVal/Limnoria-test,ProgVal/Limnoria-test