diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs | 16 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | 23 |
2 files changed, 13 insertions, 26 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs index 5b9a5b5..941379f 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs | |||
@@ -270,7 +270,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
270 | 270 | ||
271 | public void Close() | 271 | public void Close() |
272 | { | 272 | { |
273 | |||
274 | m_log.InfoFormat("[IRC-Connector-{0}] Closing", idn); | 273 | m_log.InfoFormat("[IRC-Connector-{0}] Closing", idn); |
275 | 274 | ||
276 | lock (msyncConnect) | 275 | lock (msyncConnect) |
@@ -295,7 +294,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
295 | } | 294 | } |
296 | catch (Exception) { } | 295 | catch (Exception) { } |
297 | 296 | ||
298 | |||
299 | m_connected = false; | 297 | m_connected = false; |
300 | 298 | ||
301 | try { m_writer.Close(); } | 299 | try { m_writer.Close(); } |
@@ -308,10 +306,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
308 | catch (Exception) { } | 306 | catch (Exception) { } |
309 | 307 | ||
310 | } | 308 | } |
311 | |||
312 | lock (m_connectors) | 309 | lock (m_connectors) |
313 | m_connectors.Remove(this); | 310 | m_connectors.Remove(this); |
314 | |||
315 | } | 311 | } |
316 | } | 312 | } |
317 | 313 | ||
@@ -327,25 +323,21 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
327 | 323 | ||
328 | public void Connect() | 324 | public void Connect() |
329 | { | 325 | { |
330 | |||
331 | if (!m_enabled) | 326 | if (!m_enabled) |
332 | return; | 327 | return; |
333 | 328 | ||
334 | // Delay until next WD cycle if this is too close to the last start attempt | 329 | // Delay until next WD cycle if this is too close to the last start attempt |
335 | 330 | if(_icc_ < ICCD_PERIOD) | |
336 | while (_icc_ < ICCD_PERIOD) | ||
337 | return; | 331 | return; |
338 | 332 | ||
339 | m_log.DebugFormat("[IRC-Connector-{0}]: Connection request for {1} on {2}:{3}", idn, m_nick, m_server, m_ircChannel); | 333 | m_log.DebugFormat("[IRC-Connector-{0}]: Connection request for {1} on {2}:{3}", idn, m_nick, m_server, m_ircChannel); |
340 | 334 | ||
335 | _icc_ = 0; | ||
336 | |||
341 | lock (msyncConnect) | 337 | lock (msyncConnect) |
342 | { | 338 | { |
343 | |||
344 | _icc_ = 0; | ||
345 | |||
346 | try | 339 | try |
347 | { | 340 | { |
348 | |||
349 | if (m_connected) return; | 341 | if (m_connected) return; |
350 | 342 | ||
351 | m_connected = true; | 343 | m_connected = true; |
@@ -379,11 +371,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
379 | // expires. By leaving them as they are, the connection will be retried | 371 | // expires. By leaving them as they are, the connection will be retried |
380 | // when the login timeout expires. Which is preferred. | 372 | // when the login timeout expires. Which is preferred. |
381 | } | 373 | } |
382 | |||
383 | } | 374 | } |
384 | 375 | ||
385 | return; | 376 | return; |
386 | |||
387 | } | 377 | } |
388 | 378 | ||
389 | // Reconnect is used to force a re-cycle of the IRC connection. Should generally | 379 | // Reconnect is used to force a re-cycle of the IRC connection. Should generally |
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; |