function methods.InternalDestroy(m)for o,j in pairs(m.Channels)do j:InternalRemoveSpeaker(m)end m.eDestroyed:Fire()m.EventFolder=nil m.eDestroyed:Destroy()m.eSaidMessage:Destroy()m.eReceivedMessage:Destroy()m.eReceivedUnfilteredMessage:Destroy()m.eMessageDoneFiltering:Destroy()m.eReceivedSystemMessage:Destroy()m.eChannelJoined:Destroy()m.eChannelLeft:Destroy()m.eMuted:Destroy()m.eUnmuted:Destroy()m.eExtraDataUpdated:Destroy()m.eMainChannelSet:Destroy()m.eChannelNameColorUpdated:Destroy()end function methods.InternalAssignPlayerObject(o,m)o.PlayerObj=m end function methods.InternalAssignEventFolder(o,m)o.EventFolder=m end function methods.InternalSendMessage(j,m,o)local h,F=pcall(function()j:LazyFire("\101\082\101\099\101\105\118\101\100\085\110\102\105\108\116\101\114\101\100\077\101\115\115\097\103\101",m,o)j.EventFolder.OnNewMessage:FireClient(j.PlayerObj,m,o)end)if not h and F then print("\069\114\114\111\114 \115\101\110\100\105\110\103 \105\110\116\101\114\110\097\108 \109\101\115\115\097\103\101\058 "..F)end end function methods.InternalSendFilteredMessage(j,m,o)local h,F=pcall(function()j:LazyFire("\101\082\101\099\101\105\118\101\100\077\101\115\115\097\103\101",m,o)j:LazyFire("\101\077\101\115\115\097\103\101\068\111\110\101\070\105\108\116\101\114\105\110\103",m,o)j.EventFolder.OnMessageDoneFiltering:FireClient(j.PlayerObj,m,o)end)if not h and F then print("\069\114\114\111\114 \115\101\110\100\105\110\103 \105\110\116\101\114\110\097\108 \102\105\108\116\101\114\101\100 \109\101\115\115\097\103\101\058 "..F)end end

function methods:InternalDestroy()
	for i, channel in pairs(self.Channels) do
		channel:InternalRemoveSpeaker(self)
	end

	self.eDestroyed:Fire()

	self.EventFolder = nil
	self.eDestroyed:Destroy()
	self.eSaidMessage:Destroy()
	self.eReceivedMessage:Destroy()
	self.eReceivedUnfilteredMessage:Destroy()
	self.eMessageDoneFiltering:Destroy()
	self.eReceivedSystemMessage:Destroy()
	self.eChannelJoined:Destroy()
	self.eChannelLeft:Destroy()
	self.eMuted:Destroy()
	self.eUnmuted:Destroy()
	self.eExtraDataUpdated:Destroy()
	self.eMainChannelSet:Destroy()
	self.eChannelNameColorUpdated:Destroy()
end

function methods:InternalAssignPlayerObject(playerObj)
	self.PlayerObj = playerObj
end

function methods:InternalAssignEventFolder(eventFolder)
	self.EventFolder = eventFolder
end

function methods:InternalSendMessage(messageObj, channelName)
	local success, err = pcall(function()
		self:LazyFire("eReceivedUnfilteredMessage", messageObj, channelName)
		self.EventFolder.OnNewMessage:FireClient(self.PlayerObj, messageObj, channelName)
	end)
	if not success and err then
		print("Error sending internal message: " ..err)
	end
end

function methods:InternalSendFilteredMessage(messageObj, channelName)
	local success, err = pcall(function()
		self:LazyFire("eReceivedMessage", messageObj, channelName)
		self:LazyFire("eMessageDoneFiltering", messageObj, channelName)
		self.EventFolder.OnMessageDoneFiltering:FireClient(self.PlayerObj, messageObj, channelName)
	end)
	if not success and err then
		print("Error sending internal filtered message: " ..err)
	end
end
