Function to convert old-style to new-style hosttags