* Implements ISecurityCredential member on SPAvatar, SPAvatarAttachment

* Disables 'event not used' warning for IRCClientView; cuts OpenSim total warnings back.
arthursv
Adam Frisby 2009-08-16 22:01:18 +10:00
parent c2be3edd2d
commit cbd454d692
5 changed files with 17 additions and 9 deletions

View File

@ -634,7 +634,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
{
get { return (uint)Util.RandomClass.Next(0,int.MaxValue); }
}
#pragma warning disable 67
public event GenericMessage OnGenericMessage;
public event ImprovedInstantMessage OnInstantMessage;
public event ChatMessage OnChatFromClient;
@ -826,6 +826,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
public event AvatarNotesUpdate OnAvatarNotesUpdate;
public event MuteListRequest OnMuteListRequest;
public event PlacesQuery OnPlacesQuery;
#pragma warning restore 67
public void SetDebugPacketLevel(int newDebug)
{

View File

@ -117,7 +117,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
if (_OnTouchActive && m_localID == localID)
{
TouchEventArgs e = new TouchEventArgs();
e.Avatar = new SPAvatar(m_rootScene, remoteClient.AgentId);
e.Avatar = new SPAvatar(m_rootScene, remoteClient.AgentId, m_security);
e.TouchBiNormal = surfaceArgs.Binormal;
e.TouchMaterialIndex = surfaceArgs.FaceIndex;
e.TouchNormal = surfaceArgs.Normal;

View File

@ -42,11 +42,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
{
private readonly Scene m_rootScene;
private readonly UUID m_ID;
private readonly ISecurityCredential m_security;
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public SPAvatar(Scene scene, UUID ID)
public SPAvatar(Scene scene, UUID ID, ISecurityCredential security)
{
m_rootScene = scene;
m_security = security;
m_ID = ID;
}
@ -84,7 +86,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
foreach (DictionaryEntry element in internalAttachments)
{
Hashtable attachInfo = (Hashtable)element.Value;
attachments.Add(new SPAvatarAttachment(m_rootScene, this, (int)element.Key, new UUID((string)attachInfo["item"]), new UUID((string)attachInfo["asset"])));
attachments.Add(new SPAvatarAttachment(m_rootScene, this, (int) element.Key,
new UUID((string) attachInfo["item"]),
new UUID((string) attachInfo["asset"]), m_security));
}
}

View File

@ -39,10 +39,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
private readonly int m_location;
//private readonly UUID m_itemId;
private readonly UUID m_assetId;
private readonly ISecurityCredential m_security;
public SPAvatarAttachment(Scene rootScene, IAvatar self, int location, UUID itemId, UUID assetId)
public SPAvatarAttachment(Scene rootScene, IAvatar self, int location, UUID itemId, UUID assetId, ISecurityCredential security)
{
m_rootScene = rootScene;
m_security = security;
//m_parent = self;
m_location = location;
//m_itemId = itemId;
@ -55,7 +58,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
{
get
{
return new SOPObject(m_rootScene, m_rootScene.GetSceneObjectPart(m_assetId).LocalId);
return new SOPObject(m_rootScene, m_rootScene.GetSceneObjectPart(m_assetId).LocalId, m_security);
}
}
}

View File

@ -86,7 +86,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
if (_OnNewUser != null)
{
NewUserEventArgs e = new NewUserEventArgs();
e.Avatar = new SPAvatar(m_internalScene, presence.UUID);
e.Avatar = new SPAvatar(m_internalScene, presence.UUID, m_security);
_OnNewUser(this, e);
}
}
@ -156,7 +156,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
if (chat.Sender != null && chat.SenderObject == null)
{
ChatEventArgs e = new ChatEventArgs();
e.Sender = new SPAvatar(m_internalScene, chat.SenderUUID);
e.Sender = new SPAvatar(m_internalScene, chat.SenderUUID, m_security);
e.Text = chat.Message;
_OnChat(this, e);
@ -209,7 +209,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
for (int i = 0; i < ents.Count; i++)
{
EntityBase ent = ents[i];
rets[i] = new SPAvatar(m_internalScene, ent.UUID);
rets[i] = new SPAvatar(m_internalScene, ent.UUID, m_security);
}
return rets;