Added support for custom hostmasks