I guess @flabby did not bother to make another if() in case someone tries to add himself as a friend. I don’t suppose it’s something troublesome. Personally I think he knows about this but let’s wait for his reply.
This was actually a feature that was requested way back in the day when the friends system was first released. Originally you could not add yourself but due a surprising number of requests I removed the limitation. I quite like the ability to add yourself especially when you are your only friend :)