General purpose utility classes created for DMDirc