diff options
author | Melanie | 2009-08-17 08:56:40 +0100 |
---|---|---|
committer | Melanie | 2009-08-17 08:56:40 +0100 |
commit | dc0f0f5da87d6f7d310b1a3985186ca0af954e3f (patch) | |
tree | d724090c9663a5b090d4f6b9dd0de4cab3d1a675 | |
parent | Add the remote console parameters to the example file (diff) | |
download | opensim-SC-dc0f0f5da87d6f7d310b1a3985186ca0af954e3f.zip opensim-SC-dc0f0f5da87d6f7d310b1a3985186ca0af954e3f.tar.gz opensim-SC-dc0f0f5da87d6f7d310b1a3985186ca0af954e3f.tar.bz2 opensim-SC-dc0f0f5da87d6f7d310b1a3985186ca0af954e3f.tar.xz |
Limit the scrollback buffer output of the command line client to
100 lines (4 screens worth) so things don't scroll endlessly on connect
Diffstat (limited to '')
-rw-r--r-- | OpenSim/ConsoleClient/ConsoleClient.cs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/OpenSim/ConsoleClient/ConsoleClient.cs b/OpenSim/ConsoleClient/ConsoleClient.cs index 0d4f3cf..1e5f0b7 100644 --- a/OpenSim/ConsoleClient/ConsoleClient.cs +++ b/OpenSim/ConsoleClient/ConsoleClient.cs | |||
@@ -163,12 +163,25 @@ namespace OpenSim.ConsoleClient | |||
163 | return; | 163 | return; |
164 | } | 164 | } |
165 | 165 | ||
166 | List<string> lines = new List<string>(); | ||
167 | |||
166 | foreach (XmlNode part in rootNodeL[0].ChildNodes) | 168 | foreach (XmlNode part in rootNodeL[0].ChildNodes) |
167 | { | 169 | { |
168 | if (part.Name != "Line") | 170 | if (part.Name != "Line") |
169 | continue; | 171 | continue; |
170 | 172 | ||
171 | string[] parts = part.InnerText.Split(new char[] {':'}, 3); | 173 | lines.Add(part.InnerText); |
174 | } | ||
175 | |||
176 | // Cut down scrollback to 100 lines (4 screens) | ||
177 | // for the command line client | ||
178 | // | ||
179 | while (lines.Count > 100) | ||
180 | lines.RemoveAt(0); | ||
181 | |||
182 | foreach (string l in lines) | ||
183 | { | ||
184 | string[] parts = l.Split(new char[] {':'}, 3); | ||
172 | if (parts.Length != 3) | 185 | if (parts.Length != 3) |
173 | continue; | 186 | continue; |
174 | 187 | ||