diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 626937c..81add13 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -1177,18 +1177,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1177 | } | 1177 | } |
1178 | 1178 | ||
1179 | GroupRecord groupInfo = m_groupData.GetGroupRecord(agentID, groupID, null); | 1179 | GroupRecord groupInfo = m_groupData.GetGroupRecord(agentID, groupID, null); |
1180 | 1180 | if (groupInfo == null) | |
1181 | UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(regionInfo.ScopeID, ejecteeID); | ||
1182 | if ((groupInfo == null) || (account == null)) | ||
1183 | { | ||
1184 | return; | 1181 | return; |
1185 | } | 1182 | |
1186 | 1183 | ||
1187 | IClientAPI ejecteeClient = GetActiveRootClient(ejecteeID); | 1184 | IClientAPI ejecteeClient = GetActiveRootClient(ejecteeID); |
1188 | 1185 | ||
1189 | // Send Message to Ejectee | 1186 | // Send Message to Ejectee |
1190 | GridInstantMessage msg = new GridInstantMessage(); | 1187 | GridInstantMessage msg = new GridInstantMessage(); |
1191 | 1188 | ||
1189 | string ejecteeName = "Unknown member"; | ||
1192 | // if local send a normal message | 1190 | // if local send a normal message |
1193 | if(ejecteeClient != null) | 1191 | if(ejecteeClient != null) |
1194 | { | 1192 | { |
@@ -1197,6 +1195,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1197 | // also execute and send update | 1195 | // also execute and send update |
1198 | ejecteeClient.SendAgentDropGroup(groupID); | 1196 | ejecteeClient.SendAgentDropGroup(groupID); |
1199 | SendAgentGroupDataUpdate(ejecteeClient,true); | 1197 | SendAgentGroupDataUpdate(ejecteeClient,true); |
1198 | ejecteeName = ejecteeClient.Name; | ||
1200 | } | 1199 | } |
1201 | else // send | 1200 | else // send |
1202 | { | 1201 | { |
@@ -1208,6 +1207,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1208 | 1207 | ||
1209 | msg.imSessionID = groupInfo.GroupID.Guid; | 1208 | msg.imSessionID = groupInfo.GroupID.Guid; |
1210 | msg.dialog = (byte)210; //interop | 1209 | msg.dialog = (byte)210; //interop |
1210 | UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(regionInfo.ScopeID, ejecteeID); | ||
1211 | if (account != null) | ||
1212 | ejecteeName = account.FirstName + " " + account.LastName; | ||
1211 | } | 1213 | } |
1212 | 1214 | ||
1213 | msg.fromAgentID = agentID.Guid; | 1215 | msg.fromAgentID = agentID.Guid; |
@@ -1234,14 +1236,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1234 | msg.toAgentID = agentID.Guid; | 1236 | msg.toAgentID = agentID.Guid; |
1235 | msg.timestamp = 0; | 1237 | msg.timestamp = 0; |
1236 | msg.fromAgentName = agentName; | 1238 | msg.fromAgentName = agentName; |
1237 | if (account != null) | 1239 | |
1238 | { | 1240 | msg.message = string.Format("{2} has been ejected from '{1}' by {0}.", agentName, groupInfo.GroupName, ejecteeName); |
1239 | msg.message = string.Format("{2} has been ejected from '{1}' by {0}.", agentName, groupInfo.GroupName, account.FirstName + " " + account.LastName); | 1241 | |
1240 | } | ||
1241 | else | ||
1242 | { | ||
1243 | msg.message = string.Format("{2} has been ejected from '{1}' by {0}.", agentName, groupInfo.GroupName, "Unknown member"); | ||
1244 | } | ||
1245 | // msg.dialog = (byte)210; //interop | 1242 | // msg.dialog = (byte)210; //interop |
1246 | msg.dialog = (byte)OpenMetaverse.InstantMessageDialog.MessageFromAgent; | 1243 | msg.dialog = (byte)OpenMetaverse.InstantMessageDialog.MessageFromAgent; |
1247 | msg.fromGroup = false; | 1244 | msg.fromGroup = false; |