Welcome to Smogon! Take a moment to read the Introduction to Smogon for a run-down on everything Smogon, and make sure you take some time to read the global rules.
I've already started writing a PR for this, but since it's a core command, I'd like to make a post in Suggestions. Basically, if /rank is used in a Battle Room (say a Gen8-1v1 battle), it'll display only the Gen8-1v1 ratings.