diff options
author | BlueWall | 2012-04-26 16:13:47 -0400 |
---|---|---|
committer | BlueWall | 2012-04-26 16:13:47 -0400 |
commit | fba802bb03b7dee804059eae888b63c88280389c (patch) | |
tree | ca7312919830dd469dfd4e9b739d5291702007e4 /OpenSim/Region/OptionalModules | |
parent | Add a version of osNpcSay that takes a channel number Mantis 5747 (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-fba802bb03b7dee804059eae888b63c88280389c.zip opensim-SC-fba802bb03b7dee804059eae888b63c88280389c.tar.gz opensim-SC-fba802bb03b7dee804059eae888b63c88280389c.tar.bz2 opensim-SC-fba802bb03b7dee804059eae888b63c88280389c.tar.xz |
Merge branch 'master' of /home/opensim/var/repo/opensim
Diffstat (limited to 'OpenSim/Region/OptionalModules')
4 files changed, 41 insertions, 21 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs b/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs index e68f9d0..2602050 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs | |||
@@ -58,6 +58,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends | |||
58 | private Scene m_scene; | 58 | private Scene m_scene; |
59 | private IFriendsModule m_friendsModule; | 59 | private IFriendsModule m_friendsModule; |
60 | private IUserManagement m_userManagementModule; | 60 | private IUserManagement m_userManagementModule; |
61 | private IPresenceService m_presenceService; | ||
61 | 62 | ||
62 | // private IAvatarFactoryModule m_avatarFactory; | 63 | // private IAvatarFactoryModule m_avatarFactory; |
63 | 64 | ||
@@ -99,8 +100,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends | |||
99 | 100 | ||
100 | m_friendsModule = m_scene.RequestModuleInterface<IFriendsModule>(); | 101 | m_friendsModule = m_scene.RequestModuleInterface<IFriendsModule>(); |
101 | m_userManagementModule = m_scene.RequestModuleInterface<IUserManagement>(); | 102 | m_userManagementModule = m_scene.RequestModuleInterface<IUserManagement>(); |
103 | m_presenceService = m_scene.RequestModuleInterface<IPresenceService>(); | ||
102 | 104 | ||
103 | if (m_friendsModule != null && m_userManagementModule != null) | 105 | if (m_friendsModule != null && m_userManagementModule != null && m_presenceService != null) |
104 | { | 106 | { |
105 | m_scene.AddCommand( | 107 | m_scene.AddCommand( |
106 | "Friends", this, "friends show", | 108 | "Friends", this, "friends show", |
@@ -162,7 +164,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends | |||
162 | 164 | ||
163 | MainConsole.Instance.OutputFormat("Friends for {0} {1} {2}:", firstName, lastName, userId); | 165 | MainConsole.Instance.OutputFormat("Friends for {0} {1} {2}:", firstName, lastName, userId); |
164 | 166 | ||
165 | MainConsole.Instance.OutputFormat("UUID, Name, MyFlags, TheirFlags"); | 167 | MainConsole.Instance.OutputFormat( |
168 | "{0,-36} {1,-36} {2,-7} {3,7} {4,10}", "UUID", "Name", "Status", "MyFlags", "TheirFlags"); | ||
166 | 169 | ||
167 | foreach (FriendInfo friend in friends) | 170 | foreach (FriendInfo friend in friends) |
168 | { | 171 | { |
@@ -175,14 +178,22 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends | |||
175 | 178 | ||
176 | UUID friendId; | 179 | UUID friendId; |
177 | string friendName; | 180 | string friendName; |
181 | string onlineText; | ||
178 | 182 | ||
179 | if (UUID.TryParse(friend.Friend, out friendId)) | 183 | if (UUID.TryParse(friend.Friend, out friendId)) |
180 | friendName = m_userManagementModule.GetUserName(friendId); | 184 | friendName = m_userManagementModule.GetUserName(friendId); |
181 | else | 185 | else |
182 | friendName = friend.Friend; | 186 | friendName = friend.Friend; |
183 | 187 | ||
188 | OpenSim.Services.Interfaces.PresenceInfo[] pi = m_presenceService.GetAgents(new string[] { friend.Friend }); | ||
189 | if (pi.Length > 0) | ||
190 | onlineText = "online"; | ||
191 | else | ||
192 | onlineText = "offline"; | ||
193 | |||
184 | MainConsole.Instance.OutputFormat( | 194 | MainConsole.Instance.OutputFormat( |
185 | "{0} {1} {2} {3}", friend.Friend, friendName, friend.MyFlags, friend.TheirFlags); | 195 | "{0,-36} {1,-36} {2,-7} {3,-7} {4,-10}", |
196 | friend.Friend, friendName, onlineText, friend.MyFlags, friend.TheirFlags); | ||
186 | } | 197 | } |
187 | } | 198 | } |
188 | } | 199 | } |
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs index eda2aef..4949097 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs | |||
@@ -163,28 +163,37 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore | |||
163 | return; | 163 | return; |
164 | } | 164 | } |
165 | 165 | ||
166 | m_comms.RegisterScriptInvocation(this,"JsonCreateStore"); | 166 | try |
167 | m_comms.RegisterScriptInvocation(this,"JsonDestroyStore"); | 167 | { |
168 | m_comms.RegisterScriptInvocation(this,"JsonCreateStore"); | ||
169 | m_comms.RegisterScriptInvocation(this,"JsonDestroyStore"); | ||
168 | 170 | ||
169 | m_comms.RegisterScriptInvocation(this,"JsonReadNotecard"); | 171 | m_comms.RegisterScriptInvocation(this,"JsonReadNotecard"); |
170 | m_comms.RegisterScriptInvocation(this,"JsonWriteNotecard"); | 172 | m_comms.RegisterScriptInvocation(this,"JsonWriteNotecard"); |
171 | 173 | ||
172 | m_comms.RegisterScriptInvocation(this,"JsonTestPath"); | 174 | m_comms.RegisterScriptInvocation(this,"JsonTestPath"); |
173 | m_comms.RegisterScriptInvocation(this,"JsonTestPathJson"); | 175 | m_comms.RegisterScriptInvocation(this,"JsonTestPathJson"); |
174 | 176 | ||
175 | m_comms.RegisterScriptInvocation(this,"JsonGetValue"); | 177 | m_comms.RegisterScriptInvocation(this,"JsonGetValue"); |
176 | m_comms.RegisterScriptInvocation(this,"JsonGetValueJson"); | 178 | m_comms.RegisterScriptInvocation(this,"JsonGetValueJson"); |
177 | 179 | ||
178 | m_comms.RegisterScriptInvocation(this,"JsonTakeValue"); | 180 | m_comms.RegisterScriptInvocation(this,"JsonTakeValue"); |
179 | m_comms.RegisterScriptInvocation(this,"JsonTakeValueJson"); | 181 | m_comms.RegisterScriptInvocation(this,"JsonTakeValueJson"); |
180 | 182 | ||
181 | m_comms.RegisterScriptInvocation(this,"JsonReadValue"); | 183 | m_comms.RegisterScriptInvocation(this,"JsonReadValue"); |
182 | m_comms.RegisterScriptInvocation(this,"JsonReadValueJson"); | 184 | m_comms.RegisterScriptInvocation(this,"JsonReadValueJson"); |
183 | 185 | ||
184 | m_comms.RegisterScriptInvocation(this,"JsonSetValue"); | 186 | m_comms.RegisterScriptInvocation(this,"JsonSetValue"); |
185 | m_comms.RegisterScriptInvocation(this,"JsonSetValueJson"); | 187 | m_comms.RegisterScriptInvocation(this,"JsonSetValueJson"); |
186 | 188 | ||
187 | m_comms.RegisterScriptInvocation(this,"JsonRemoveValue"); | 189 | m_comms.RegisterScriptInvocation(this,"JsonRemoveValue"); |
190 | } | ||
191 | catch (Exception e) | ||
192 | { | ||
193 | // See http://opensimulator.org/mantis/view.php?id=5971 for more information | ||
194 | m_log.WarnFormat("[JsonStroreScripts] script method registration failed; {0}",e.Message); | ||
195 | m_enabled = false; | ||
196 | } | ||
188 | } | 197 | } |
189 | } | 198 | } |
190 | 199 | ||
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs index 922eaaf..d192309 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs | |||
@@ -68,7 +68,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
68 | public Vector3 WorldPosition | 68 | public Vector3 WorldPosition |
69 | { | 69 | { |
70 | get { return GetSP().AbsolutePosition; } | 70 | get { return GetSP().AbsolutePosition; } |
71 | set { GetSP().TeleportWithMomentum(value); } | 71 | set { GetSP().Teleport(value); } |
72 | } | 72 | } |
73 | 73 | ||
74 | public bool IsChildAgent | 74 | public bool IsChildAgent |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index adc6f9c..3ac1eb1 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -157,7 +157,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
157 | 157 | ||
158 | sp.CompleteMovement(npcAvatar, false); | 158 | sp.CompleteMovement(npcAvatar, false); |
159 | m_avatars.Add(npcAvatar.AgentId, npcAvatar); | 159 | m_avatars.Add(npcAvatar.AgentId, npcAvatar); |
160 | m_log.DebugFormat("[NPC MODULE]: Created NPC with id {0}", npcAvatar.AgentId); | 160 | m_log.DebugFormat("[NPC MODULE]: Created NPC {0} {1}", npcAvatar.AgentId, sp.Name); |
161 | 161 | ||
162 | return npcAvatar.AgentId; | 162 | return npcAvatar.AgentId; |
163 | } | 163 | } |
@@ -340,7 +340,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
340 | scene.RemoveClient(agentID, false); | 340 | scene.RemoveClient(agentID, false); |
341 | m_avatars.Remove(agentID); | 341 | m_avatars.Remove(agentID); |
342 | 342 | ||
343 | // m_log.DebugFormat("[NPC MODULE]: Removed {0} {1}", agentID, av.Name); | 343 | m_log.DebugFormat("[NPC MODULE]: Removed NPC {0} {1}", agentID, av.Name); |
344 | return true; | 344 | return true; |
345 | } | 345 | } |
346 | } | 346 | } |