They will stop spamming when you tell them to.
Once upon a time, there was a cat who was in the middle of fighting and her friend logged in, spammed the cat for not replying within a second.
The cat killed the player with rage and replied "Please do not spam me, I can not respond immediately and may be in a middle of a game or spectating players, thank you"
The little cat never got spammed again. The end.
I would like it if there was an option to hide when friends log in and out , "xxx has just logged in, xxx has just logged out x69"
I think it may help with your suggestion as well.