svn:eol-style native is your friend

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@360 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
bushing
2006-10-21 02:52:28 +00:00
parent e0fc23f01b
commit 4fa67d3b35
251 changed files with 131628 additions and 131627 deletions

View File

@@ -32,12 +32,12 @@ using System.Globalization;
using System.IO;
using System.Text.RegularExpressions;
using libsecondlife;
using libsecondlife;
using libsecondlife.Packets;
class Decoder {
private static int BUFSIZE = 8096;
private static int BUFSIZE = 8096;
private static SecondLife client = new SecondLife();
private static ProtocolManager protocol = new ProtocolManager("keywords.txt", "message_template.msg", client);
private static string grep = null;
@@ -171,43 +171,43 @@ class Decoder {
} else
buf = data;
//Packet packet = new Packet(buf, pos, protocol);
// FIXME: Is this right? I haven't really looked at this code at all
//Packet packet = new Packet(buf, pos, protocol);
// FIXME: Is this right? I haven't really looked at this code at all
Packet packet = Packet.BuildPacket(buf, ref pos);
if (grep != null) {
bool match = false;
//FIXME: This needs to be updated for the new libsecondlife API
//foreach (Block block in packet.Blocks())
//{
// foreach (Field field in block.Fields)
// {
// string value;
// if (field.Layout.Type == FieldType.Variable)
// value = DataConvert.toChoppedString(field.Data);
// else
// value = field.Data.ToString();
// if (Regex.Match(packet.Layout.Name + "." + block.Layout.Name + "." + field.Layout.Name + " = " + value, grep, RegexOptions.IgnoreCase).Success)
// {
// match = true;
// break;
// }
// // try matching variable fields in 0x notation
// if (field.Layout.Type == FieldType.Variable)
// {
// StringWriter sw = new StringWriter();
// sw.Write("0x");
// foreach (byte b in (byte[])field.Data)
// sw.Write("{0:x2}", b);
// if (Regex.Match(packet.Layout.Name + "." + block.Layout.Name + "." + field.Layout.Name + " = " + sw, grep, RegexOptions.IgnoreCase).Success)
// {
// match = true;
// break;
// }
// }
// }
bool match = false;
//FIXME: This needs to be updated for the new libsecondlife API
//foreach (Block block in packet.Blocks())
//{
// foreach (Field field in block.Fields)
// {
// string value;
// if (field.Layout.Type == FieldType.Variable)
// value = DataConvert.toChoppedString(field.Data);
// else
// value = field.Data.ToString();
// if (Regex.Match(packet.Layout.Name + "." + block.Layout.Name + "." + field.Layout.Name + " = " + value, grep, RegexOptions.IgnoreCase).Success)
// {
// match = true;
// break;
// }
// // try matching variable fields in 0x notation
// if (field.Layout.Type == FieldType.Variable)
// {
// StringWriter sw = new StringWriter();
// sw.Write("0x");
// foreach (byte b in (byte[])field.Data)
// sw.Write("{0:x2}", b);
// if (Regex.Match(packet.Layout.Name + "." + block.Layout.Name + "." + field.Layout.Name + " = " + sw, grep, RegexOptions.IgnoreCase).Success)
// {
// match = true;
// break;
// }
// }
// }
//}
if (!match) {