aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar
diff options
context:
space:
mode:
authorMelanie2019-08-20 23:28:59 +0100
committerMelanie2019-08-20 23:28:59 +0100
commit0fd17c08ae642fac17b24dfad06c61cfe5739483 (patch)
tree4871c96eab2f5b118cb09d670a3a4ba024cf1210 /OpenSim/Region/OptionalModules/Avatar
parentchange PGSQL migration (diff)
downloadopensim-SC-0fd17c08ae642fac17b24dfad06c61cfe5739483.zip
opensim-SC-0fd17c08ae642fac17b24dfad06c61cfe5739483.tar.gz
opensim-SC-0fd17c08ae642fac17b24dfad06c61cfe5739483.tar.bz2
opensim-SC-0fd17c08ae642fac17b24dfad06c61cfe5739483.tar.xz
Massive console refactor. Greatly simplify interface.
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar')
-rwxr-xr-x[-rw-r--r--]OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs2
-rwxr-xr-x[-rw-r--r--]OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs37
-rwxr-xr-x[-rw-r--r--]OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs15
-rwxr-xr-x[-rw-r--r--]OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs8
-rwxr-xr-x[-rw-r--r--]OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs2
-rwxr-xr-x[-rw-r--r--]OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs2
6 files changed, 37 insertions, 29 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs b/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs
index 0698cec..4e8f507 100644..100755
--- a/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs
@@ -109,7 +109,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Animations
109 { 109 {
110 if (cmd.Length != 2 && cmd.Length < 4) 110 if (cmd.Length != 2 && cmd.Length < 4)
111 { 111 {
112 MainConsole.Instance.OutputFormat("Usage: show animations [<first-name> <last-name>]"); 112 MainConsole.Instance.Output("Usage: show animations [<first-name> <last-name>]");
113 return; 113 return;
114 } 114 }
115 115
diff --git a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
index c04f40c..ded0857 100644..100755
--- a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
@@ -154,7 +154,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
154 { 154 {
155 if (cmd.Length != 2 && cmd.Length < 4) 155 if (cmd.Length != 2 && cmd.Length < 4)
156 { 156 {
157 MainConsole.Instance.OutputFormat("Usage: appearance send [<first-name> <last-name>]"); 157 MainConsole.Instance.Output("Usage: appearance send [<first-name> <last-name>]");
158 return; 158 return;
159 } 159 }
160 160
@@ -178,8 +178,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
178 ScenePresence sp = scene.GetScenePresence(optionalTargetFirstName, optionalTargetLastName); 178 ScenePresence sp = scene.GetScenePresence(optionalTargetFirstName, optionalTargetLastName);
179 if (sp != null && !sp.IsChildAgent) 179 if (sp != null && !sp.IsChildAgent)
180 { 180 {
181 MainConsole.Instance.OutputFormat( 181 MainConsole.Instance.Output(
182 "Sending appearance information for {0} to all other avatars in {1}", 182 "Sending appearance information for {0} to all other avatars in {1}",
183 null,
183 sp.Name, scene.RegionInfo.RegionName); 184 sp.Name, scene.RegionInfo.RegionName);
184 185
185 scene.AvatarFactory.SendAppearance(sp.UUID); 186 scene.AvatarFactory.SendAppearance(sp.UUID);
@@ -190,8 +191,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
190 scene.ForEachRootScenePresence( 191 scene.ForEachRootScenePresence(
191 sp => 192 sp =>
192 { 193 {
193 MainConsole.Instance.OutputFormat( 194 MainConsole.Instance.Output(
194 "Sending appearance information for {0} to all other avatars in {1}", 195 "Sending appearance information for {0} to all other avatars in {1}",
196 null,
195 sp.Name, scene.RegionInfo.RegionName); 197 sp.Name, scene.RegionInfo.RegionName);
196 198
197 scene.AvatarFactory.SendAppearance(sp.UUID); 199 scene.AvatarFactory.SendAppearance(sp.UUID);
@@ -206,7 +208,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
206 { 208 {
207 if (cmd.Length != 2 && cmd.Length < 4) 209 if (cmd.Length != 2 && cmd.Length < 4)
208 { 210 {
209 MainConsole.Instance.OutputFormat("Usage: appearance show [<first-name> <last-name>]"); 211 MainConsole.Instance.Output("Usage: appearance show [<first-name> <last-name>]");
210 return; 212 return;
211 } 213 }
212 214
@@ -229,7 +231,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
229 { 231 {
230 ScenePresence sp = scene.GetScenePresence(optionalTargetFirstName, optionalTargetLastName); 232 ScenePresence sp = scene.GetScenePresence(optionalTargetFirstName, optionalTargetLastName);
231 if (sp != null && !sp.IsChildAgent) 233 if (sp != null && !sp.IsChildAgent)
232 scene.AvatarFactory.WriteBakedTexturesReport(sp, MainConsole.Instance.OutputFormat); 234 scene.AvatarFactory.WriteBakedTexturesReport(sp, MainConsole.Instance.Output);
233 } 235 }
234 else 236 else
235 { 237 {
@@ -237,8 +239,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
237 sp => 239 sp =>
238 { 240 {
239 bool bakedTextureValid = scene.AvatarFactory.ValidateBakedTextureCache(sp); 241 bool bakedTextureValid = scene.AvatarFactory.ValidateBakedTextureCache(sp);
240 MainConsole.Instance.OutputFormat( 242 MainConsole.Instance.Output(
241 "{0} baked appearance texture is {1}", sp.Name, bakedTextureValid ? "OK" : "incomplete"); 243 "{0} baked appearance texture is {1}", null, sp.Name, bakedTextureValid ? "OK" : "incomplete");
242 } 244 }
243 ); 245 );
244 } 246 }
@@ -250,7 +252,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
250 { 252 {
251 if (cmd.Length != 4) 253 if (cmd.Length != 4)
252 { 254 {
253 MainConsole.Instance.OutputFormat("Usage: appearance rebake <first-name> <last-name>"); 255 MainConsole.Instance.Output("Usage: appearance rebake <first-name> <last-name>");
254 return; 256 return;
255 } 257 }
256 258
@@ -267,12 +269,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
267 int rebakesRequested = scene.AvatarFactory.RequestRebake(sp, false); 269 int rebakesRequested = scene.AvatarFactory.RequestRebake(sp, false);
268 270
269 if (rebakesRequested > 0) 271 if (rebakesRequested > 0)
270 MainConsole.Instance.OutputFormat( 272 MainConsole.Instance.Output(
271 "Requesting rebake of {0} uploaded textures for {1} in {2}", 273 "Requesting rebake of {0} uploaded textures for {1} in {2}",
274 null,
272 rebakesRequested, sp.Name, scene.RegionInfo.RegionName); 275 rebakesRequested, sp.Name, scene.RegionInfo.RegionName);
273 else 276 else
274 MainConsole.Instance.OutputFormat( 277 MainConsole.Instance.Output(
275 "No texture IDs available for rebake request for {0} in {1}", 278 "No texture IDs available for rebake request for {0} in {1}",
279 null,
276 sp.Name, scene.RegionInfo.RegionName); 280 sp.Name, scene.RegionInfo.RegionName);
277 } 281 }
278 } 282 }
@@ -283,7 +287,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
283 { 287 {
284 if (cmd.Length != 3) 288 if (cmd.Length != 3)
285 { 289 {
286 MainConsole.Instance.OutputFormat("Usage: appearance find <uuid-or-start-of-uuid>"); 290 MainConsole.Instance.Output("Usage: appearance find <uuid-or-start-of-uuid>");
287 return; 291 return;
288 } 292 }
289 293
@@ -310,12 +314,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
310 314
311 if (matchedAvatars.Count == 0) 315 if (matchedAvatars.Count == 0)
312 { 316 {
313 MainConsole.Instance.OutputFormat("{0} did not match any baked avatar textures in use", rawUuid); 317 MainConsole.Instance.Output("{0} did not match any baked avatar textures in use", null, rawUuid);
314 } 318 }
315 else 319 else
316 { 320 {
317 MainConsole.Instance.OutputFormat( 321 MainConsole.Instance.Output(
318 "{0} matched {1}", 322 "{0} matched {1}",
323 null,
319 rawUuid, 324 rawUuid,
320 string.Join(", ", matchedAvatars.ToList().ConvertAll<string>(sp => sp.Name).ToArray())); 325 string.Join(", ", matchedAvatars.ToList().ConvertAll<string>(sp => sp.Name).ToArray()));
321 } 326 }
@@ -325,7 +330,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
325 { 330 {
326 if (cmd.Length != 2 && cmd.Length < 4) 331 if (cmd.Length != 2 && cmd.Length < 4)
327 { 332 {
328 MainConsole.Instance.OutputFormat("Usage: wearables show [<first-name> <last-name>]"); 333 MainConsole.Instance.Output("Usage: wearables show [<first-name> <last-name>]");
329 return; 334 return;
330 } 335 }
331 336
@@ -388,7 +393,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
388 { 393 {
389 if (cmd.Length != 4) 394 if (cmd.Length != 4)
390 { 395 {
391 MainConsole.Instance.OutputFormat("Usage: wearables check <first-name> <last-name>"); 396 MainConsole.Instance.Output("Usage: wearables check <first-name> <last-name>");
392 return; 397 return;
393 } 398 }
394 399
@@ -410,7 +415,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
410 AvatarWearable[] wearables = sp.Appearance.Wearables; 415 AvatarWearable[] wearables = sp.Appearance.Wearables;
411 if(wearables.Count() == 0) 416 if(wearables.Count() == 0)
412 { 417 {
413 MainConsole.Instance.OutputFormat("avatar has no wearables"); 418 MainConsole.Instance.Output("avatar has no wearables");
414 return; 419 return;
415 } 420 }
416 421
diff --git a/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs b/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs
index 31fc56a..030c9eb 100644..100755
--- a/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs
@@ -122,7 +122,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends
122 122
123 if (mainParams.Count != 4) 123 if (mainParams.Count != 4)
124 { 124 {
125 MainConsole.Instance.OutputFormat("Usage: friends show [--cache] <first-name> <last-name>"); 125 MainConsole.Instance.Output("Usage: friends show [--cache] <first-name> <last-name>");
126 return; 126 return;
127 } 127 }
128 128
@@ -136,7 +136,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends
136 136
137 if (userId == UUID.Zero) 137 if (userId == UUID.Zero)
138 { 138 {
139 MainConsole.Instance.OutputFormat("No such user as {0} {1}", firstName, lastName); 139 MainConsole.Instance.Output("No such user as {0} {1}", null, firstName, lastName);
140 return; 140 return;
141 } 141 }
142 142
@@ -146,7 +146,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends
146 { 146 {
147 if (!m_friendsModule.AreFriendsCached(userId)) 147 if (!m_friendsModule.AreFriendsCached(userId))
148 { 148 {
149 MainConsole.Instance.OutputFormat("No friends cached on this simulator for {0} {1}", firstName, lastName); 149 MainConsole.Instance.Output("No friends cached on this simulator for {0} {1}", null, firstName, lastName);
150 return; 150 return;
151 } 151 }
152 else 152 else
@@ -162,10 +162,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends
162 friends = ((FriendsModule)m_friendsModule).FriendsService.GetFriends(userId); 162 friends = ((FriendsModule)m_friendsModule).FriendsService.GetFriends(userId);
163 } 163 }
164 164
165 MainConsole.Instance.OutputFormat("Friends for {0} {1} {2}:", firstName, lastName, userId); 165 MainConsole.Instance.Output("Friends for {0} {1} {2}:", null, firstName, lastName, userId);
166 166
167 MainConsole.Instance.OutputFormat( 167 MainConsole.Instance.Output(
168 "{0,-36} {1,-36} {2,-7} {3,7} {4,10}", "UUID", "Name", "Status", "MyFlags", "TheirFlags"); 168 "{0,-36} {1,-36} {2,-7} {3,7} {4,10}", null, "UUID", "Name", "Status", "MyFlags", "TheirFlags");
169 169
170 foreach (FriendInfo friend in friends) 170 foreach (FriendInfo friend in friends)
171 { 171 {
@@ -191,8 +191,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends
191 else 191 else
192 onlineText = "offline"; 192 onlineText = "offline";
193 193
194 MainConsole.Instance.OutputFormat( 194 MainConsole.Instance.Output(
195 "{0,-36} {1,-36} {2,-7} {3,-7} {4,-10}", 195 "{0,-36} {1,-36} {2,-7} {3,-7} {4,-10}",
196 null,
196 friend.Friend, friendName, onlineText, friend.MyFlags, friend.TheirFlags); 197 friend.Friend, friendName, onlineText, friend.MyFlags, friend.TheirFlags);
197 } 198 }
198 } 199 }
diff --git a/OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs b/OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs
index 1b5ee04..1dd5b0a 100644..100755
--- a/OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs
@@ -142,8 +142,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.SitStand
142 142
143 if (sitPart != null) 143 if (sitPart != null)
144 { 144 {
145 MainConsole.Instance.OutputFormat( 145 MainConsole.Instance.Output(
146 "Sitting {0} on {1} {2} in {3}", 146 "Sitting {0} on {1} {2} in {3}",
147 null,
147 sp.Name, sitPart.ParentGroup.Name, sitPart.ParentGroup.UUID, m_scene.Name); 148 sp.Name, sitPart.ParentGroup.Name, sitPart.ParentGroup.UUID, m_scene.Name);
148 149
149 sp.HandleAgentRequestSit(sp.ControllingClient, sp.UUID, sitPart.UUID, Vector3.Zero); 150 sp.HandleAgentRequestSit(sp.ControllingClient, sp.UUID, sitPart.UUID, Vector3.Zero);
@@ -151,8 +152,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.SitStand
151 } 152 }
152 else 153 else
153 { 154 {
154 MainConsole.Instance.OutputFormat( 155 MainConsole.Instance.Output(
155 "Could not find any unoccupied set seat on which to sit {0} in {1}. Aborting", 156 "Could not find any unoccupied set seat on which to sit {0} in {1}. Aborting",
157 null,
156 sp.Name, m_scene.Name); 158 sp.Name, m_scene.Name);
157 159
158 break; 160 break;
@@ -177,7 +179,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.SitStand
177 { 179 {
178 if (sp.SitGround || sp.IsSatOnObject) 180 if (sp.SitGround || sp.IsSatOnObject)
179 { 181 {
180 MainConsole.Instance.OutputFormat("Standing {0} in {1}", sp.Name, m_scene.Name); 182 MainConsole.Instance.Output("Standing {0} in {1}", null, sp.Name, m_scene.Name);
181 sp.StandUp(); 183 sp.StandUp();
182 } 184 }
183 } 185 }
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
index 8791235..04ff09d 100644..100755
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
@@ -243,7 +243,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
243 243
244 m_debugEnabled = verbose; 244 m_debugEnabled = verbose;
245 245
246 MainConsole.Instance.OutputFormat("{0} verbose logging set to {1}", Name, m_debugEnabled); 246 MainConsole.Instance.Output("{0} verbose logging set to {1}", null, Name, m_debugEnabled);
247 } 247 }
248 248
249 /// <summary> 249 /// <summary>
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index 4b81838..1d65d8b 100644..100755
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -154,7 +154,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
154 154
155 m_debugEnabled = verbose; 155 m_debugEnabled = verbose;
156 156
157 MainConsole.Instance.OutputFormat("{0} verbose logging set to {1}", Name, m_debugEnabled); 157 MainConsole.Instance.Output("{0} verbose logging set to {1}", null, Name, m_debugEnabled);
158 } 158 }
159 159
160 public void RegionLoaded(Scene scene) 160 public void RegionLoaded(Scene scene)