I did it this way so that if a user forgot to specify a room, like
"/invite user1 user2 user3"
the command would at least verify all the given usernames.

If it was automatically assumed the last parameter was a room, then user1 & user2 would get an invite into room "user3".