diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs index 9a6d277..ddb6a71 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs | |||
@@ -87,6 +87,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
87 | m_StatusNotifier = new HGStatusNotifier(this); | 87 | m_StatusNotifier = new HGStatusNotifier(this); |
88 | } | 88 | } |
89 | 89 | ||
90 | protected override void InitModule(IConfigSource config) | ||
91 | { | ||
92 | base.InitModule(config); | ||
93 | |||
94 | // Additionally to the base method | ||
95 | IConfig friendsConfig = config.Configs["HGFriendsModule"]; | ||
96 | if (friendsConfig != null) | ||
97 | { | ||
98 | // TODO: read in all config variables pertaining to | ||
99 | // HG friendship permissions | ||
100 | } | ||
101 | } | ||
102 | |||
90 | #endregion | 103 | #endregion |
91 | 104 | ||
92 | #region IFriendsSimConnector | 105 | #region IFriendsSimConnector |
@@ -105,6 +118,23 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
105 | 118 | ||
106 | #endregion | 119 | #endregion |
107 | 120 | ||
121 | protected override void OnInstantMessage(IClientAPI client, GridInstantMessage im) | ||
122 | { | ||
123 | if ((InstantMessageDialog)im.dialog == InstantMessageDialog.FriendshipOffered) | ||
124 | { | ||
125 | // we got a friendship offer | ||
126 | UUID principalID = new UUID(im.fromAgentID); | ||
127 | UUID friendID = new UUID(im.toAgentID); | ||
128 | |||
129 | // TODO: CHECK IF friendID is foreigner and if principalID has the permission | ||
130 | // to request these kinds of friendships. If not, return immediately. | ||
131 | // Maybe you want to let the client know too with | ||
132 | // client.SendAlertMessage | ||
133 | } | ||
134 | |||
135 | base.OnInstantMessage(client, im); | ||
136 | } | ||
137 | |||
108 | protected override void OnApproveFriendRequest(IClientAPI client, UUID friendID, List<UUID> callingCardFolders) | 138 | protected override void OnApproveFriendRequest(IClientAPI client, UUID friendID, List<UUID> callingCardFolders) |
109 | { | 139 | { |
110 | // Update the local cache. Yes, we need to do it right here | 140 | // Update the local cache. Yes, we need to do it right here |