We know that two discrete groups having the same classifying space up to homotopy are isomorphic. One can just take fundamental groups and conclude.
The situation with topological groups is subtler. The fundamental group argument doesn't work, but the loop space could work. See this unanswered question.
What if I pass to groupoids? If two discrete groupoids have homotopic classifying spaces, are they equivalent as groupoids? I suspect that taking the fundamental groupoid should suffice, but I am not sure: could anything give me help or clue?
And more subtle again: what happens with topological groupoids? Here I'm afraid I don't have a clue, in fact.
Thank you in advance.