Limit the scrollback buffer output of the command line client to

100 lines (4 screens worth) so things don't scroll endlessly on connect
arthursv
Melanie 2009-08-17 08:56:40 +01:00
parent 24f5bd8a0b
commit dc0f0f5da8
1 changed files with 14 additions and 1 deletions

View File

@ -163,12 +163,25 @@ namespace OpenSim.ConsoleClient
return;
}
List<string> lines = new List<string>();
foreach (XmlNode part in rootNodeL[0].ChildNodes)
{
if (part.Name != "Line")
continue;
string[] parts = part.InnerText.Split(new char[] {':'}, 3);
lines.Add(part.InnerText);
}
// Cut down scrollback to 100 lines (4 screens)
// for the command line client
//
while (lines.Count > 100)
lines.RemoveAt(0);
foreach (string l in lines)
{
string[] parts = l.Split(new char[] {':'}, 3);
if (parts.Length != 3)
continue;