handle twisted API change in v18.4; also handle default hostname
Begin arcbot message
This merge request is automatically copied from !236 (merged) orginally made by @dcameron
End arcbot message
Fixes BUGZ-3733
Begin arcbot message
This merge request is automatically copied from !236 (merged) orginally made by @dcameron
End arcbot message
Fixes BUGZ-3733