From a90a5f52dd5f053a83a09fdd70ca08148ef641ce Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 19 Aug 2013 19:38:20 +0100 Subject: Show number of connections each bot has established in "show bots" command. --- OpenSim/Tools/pCampBot/Bot.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'OpenSim/Tools/pCampBot/Bot.cs') diff --git a/OpenSim/Tools/pCampBot/Bot.cs b/OpenSim/Tools/pCampBot/Bot.cs index 32bf32b..be7a5a1 100644 --- a/OpenSim/Tools/pCampBot/Bot.cs +++ b/OpenSim/Tools/pCampBot/Bot.cs @@ -97,6 +97,19 @@ namespace pCampBot /// public ConnectionState ConnectionState { get; private set; } + /// + /// The number of connections that this bot has to different simulators. + /// + /// Includes both root and child connections. + public int ConnectionsCount + { + get + { + lock (Client.Network.Simulators) + return Client.Network.Simulators.Count; + } + } + public string FirstName { get; private set; } public string LastName { get; private set; } public string Name { get; private set; } @@ -144,7 +157,7 @@ namespace pCampBot ConnectionState = ConnectionState.Disconnected; behaviours.ForEach(b => b.Initialize(this)); - + Client = new GridClient(); Random = new Random(Environment.TickCount);// We do stuff randomly here -- cgit v1.1