made setfriendname() part of public api

This is needed to allow the client to easily set its own length limits and deal with duplicate names.