function module.new(p,A,l,G)local c=setmetatable({},methods)c.ChatService=p c.Name=A c.WelcomeMessage=l or""c.GetWelcomeMessageFunction=nil c.ChannelNameColor=G c.Joinable=true c.Leavable=true c.AutoJoin=false c.Private=false c.Speakers={}c.Mutes={}c.MaxHistory=200 c.HistoryIndex=0 c.ChatHistory={}c.FilterMessageFunctions=Util:NewSortedFunctionContainer()c.ProcessCommandsFunctions=Util:NewSortedFunctionContainer()c.eDestroyed=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")c.eMessagePosted=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")c.eSpeakerJoined=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")c.eSpeakerLeft=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")c.eSpeakerMuted=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")c.eSpeakerUnmuted=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")c.MessagePosted=c.eMessagePosted.Event c.SpeakerJoined=c.eSpeakerJoined.Event c.SpeakerLeft=c.eSpeakerLeft.Event c.SpeakerMuted=c.eSpeakerMuted.Event c.SpeakerUnmuted=c.eSpeakerUnmuted.Event c.Destroyed=c.eDestroyed.Event return c end return module
--///////////////////////// Constructors
--//////////////////////////////////////

function module.new(vChatService, name, welcomeMessage, channelNameColor)
	local obj = setmetatable({}, methods)

	obj.ChatService = vChatService

	obj.Name = name
	obj.WelcomeMessage = welcomeMessage or ""
	obj.GetWelcomeMessageFunction = nil
	obj.ChannelNameColor = channelNameColor

	obj.Joinable = true
	obj.Leavable = true
	obj.AutoJoin = false
	obj.Private = false

	obj.Speakers = {}
	obj.Mutes = {}

	obj.MaxHistory = 200
	obj.HistoryIndex = 0
	obj.ChatHistory = {}

	obj.FilterMessageFunctions = Util:NewSortedFunctionContainer()
	obj.ProcessCommandsFunctions = Util:NewSortedFunctionContainer()

	-- Make sure to destroy added binadable events in the InternalDestroy method.
	obj.eDestroyed = Instance.new("BindableEvent")
	obj.eMessagePosted = Instance.new("BindableEvent")
	obj.eSpeakerJoined = Instance.new("BindableEvent")
	obj.eSpeakerLeft = Instance.new("BindableEvent")
	obj.eSpeakerMuted = Instance.new("BindableEvent")
	obj.eSpeakerUnmuted = Instance.new("BindableEvent")

	obj.MessagePosted = obj.eMessagePosted.Event
	obj.SpeakerJoined = obj.eSpeakerJoined.Event
	obj.SpeakerLeft = obj.eSpeakerLeft.Event
	obj.SpeakerMuted = obj.eSpeakerMuted.Event
	obj.SpeakerUnmuted = obj.eSpeakerUnmuted.Event
	obj.Destroyed = obj.eDestroyed.Event

	return obj
end

return module
