Seeing this exploit, i thought: "Wow, what if you could easily invite huge amounts of people around you, for using this to cause insane quantities of annoyance?"
Perhaps i've got a twisted mind, but in any case, i thought the "mouseover" commands would be the most practical for this purpose.
Therefore, i found myself this macro:
OrCode:/script if UnitIsFriend("player","mouseover") then InviteUnit("mouseover") else InviteUnit("target") end
/invite [target=mouseover,help] []
Now, combining this with a second macro with a switch to "kick", this could cause quite the havock.
Unfortunately, i haven't got access to WoW atm, so i haven't got the occasion to test this out.
Perhaps any trolls out there will take interest in this. But remember, with great power, comes great responsibility. A responsibility that should be ignored while you lock your major city of choice from forming any groups.
Enjoy! (Maybe)