You could make the optional space & record type non-capturing like:

    robot.respond /dns ([^ ]+)(?: (.*))?/i, (msg) ->

This would let you use msg.match[2] below.