mantis 8654: exclude NPCs from some Friends ops

master
UbitUmarov 2020-02-01 15:26:58 +00:00
parent 016886b3c6
commit fdecf80016
1 changed files with 4 additions and 1 deletions

View File

@ -274,6 +274,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
private void OnNewClient(IClientAPI client)
{
client.OnInstantMessage += OnInstantMessage;
if (client is INPC)
return;
client.OnApproveFriendRequest += OnApproveFriendRequest;
client.OnDenyFriendRequest += OnDenyFriendRequest;
client.OnTerminateFriendship += RemoveFriendship;
@ -640,7 +644,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
protected virtual void OnApproveFriendRequest(IClientAPI client, UUID friendID, List<UUID> callingCardFolders)
{
m_log.DebugFormat("[FRIENDS]: {0} accepted friendship from {1}", client.AgentId, friendID);
AddFriendship(client, friendID);
}