private void GetChatCommand(ChatData Data) { Log.Write("Chat From: " + Data.SourceId); Log.Write("Chat person: " + ScenePrivate.FindAgent(Data.SourceId).AgentInfo.Name); AgentPrivate agent = ScenePrivate.FindAgent(Data.SourceId); ValidUsers.Clear(); ValidUsers = UsersToListenTo.Split(',').ToList(); if (UsersToListenTo.Contains("ALL")) { string DataCmd = Data.Message; Log.Write("DataCmd: " + DataCmd); ParseCommands(DataCmd); } else { foreach (string ValidUser in ValidUsers) { Log.Write("ValidUser: " + ValidUser); if (ScenePrivate.FindAgent(Data.SourceId).AgentInfo.Name == ValidUser.Trim()) { string DataCmd = Data.Message; ParseCommands(DataCmd); } } } }
private void ComplexInteractionHandler() { //Log.Write("In ComplexInteractionHandler"); ComplexInteraction.Subscribe((InteractionData idata) => { if (Debug) { ComplexInteraction.SetPrompt("Debug: " + "\nHit:" + idata.HitPosition.ToString() + "\nBy:" + ScenePrivate.FindAgent(idata.AgentId).AgentInfo.Name); //Vector hitPosition = idata.HitPosition; //Log.Write("Hit: " + idata.HitPosition.ToString()); } //Log.Write("Interacting person: " + ScenePrivate.FindAgent(idata.AgentId).AgentInfo.Name); ValidUsers.Clear(); ValidUsers = UsersToListenTo.Split(',').ToList(); if (UsersToListenTo.Contains("ALL")) { //Log.Write("Valid User: ALL"); validUser = true; } else { foreach (string ValidUser in ValidUsers) { //Log.Write("ValidUser: "******"You Are Not Authorized to Use The Looper"); //Vector hitPosition = idata.HitPosition; //Log.Write("Hit: " + idata.HitPosition.ToString()); } else { ExecuteInteraction(idata); } }); }