using System; using System.Collections.Generic; using System.Linq; using System.Text; using Uber.Collections; namespace Uber.HabboHotel.RoomBots { class BotResponse { private uint Id; public uint BotId; public SafeList Keywords; public string ResponseText; public string ResponseType; public int ServeId; public BotResponse(uint mId, uint mBotId, string mKeywords, string mResponseText, string mResponseType, int mServeId) { this.Id = mId; this.BotId = mBotId; this.ResponseText = mResponseText; this.ResponseType = mResponseType; this.ServeId = mServeId; this.Keywords = null; this.Keywords = new SafeList(); foreach (string Keyword in mKeywords.Split(';')) { this.Keywords.Add(Keyword.ToLower()); } } public bool KeywordMatched(string Message) { foreach (string Keyword in Keywords) { if (Message.ToLower().Contains(Keyword.ToLower())) { return true; } } return false; } } }