function methods.InternalDestroy(N)for U,c in pairs(N.Channels)do c:InternalRemoveSpeaker(N)end N.eDestroyed:Fire()N.EventFolder=nil N.eDestroyed:Destroy()N.eSaidMessage:Destroy()N.eReceivedMessage:Destroy()N.eReceivedUnfilteredMessage:Destroy()N.eMessageDoneFiltering:Destroy()N.eReceivedSystemMessage:Destroy()N.eChannelJoined:Destroy()N.eChannelLeft:Destroy()N.eMuted:Destroy()N.eUnmuted:Destroy()N.eExtraDataUpdated:Destroy()N.eMainChannelSet:Destroy()N.eChannelNameColorUpdated:Destroy()end function methods.InternalAssignPlayerObject(U,N)U.PlayerObj=N end function methods.InternalAssignEventFolder(U,N)U.EventFolder=N end function methods.InternalSendMessage(c,N,U)local v,Z=pcall(function()c: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",N,U)if c.PlayerObj then c.EventFolder.OnNewMessage:FireClient(c.PlayerObj,N,U)end end)if not v and Z 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 "..Z)end end function methods.InternalSendFilteredMessage(c,N,U)local v,Z=pcall(function()c:LazyFire("\101\082\101\099\101\105\118\101\100\077\101\115\115\097\103\101",N,U)c:LazyFire("\101\077\101\115\115\097\103\101\068\111\110\101\070\105\108\116\101\114\105\110\103",N,U)if c.PlayerObj then c.EventFolder.OnMessageDoneFiltering:FireClient(c.PlayerObj,N,U)end end)if not v and Z 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 "..Z)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)
		if self.PlayerObj then
			self.EventFolder.OnNewMessage:FireClient(self.PlayerObj, messageObj, channelName)
		end
	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)
		if self.PlayerObj then
			self.EventFolder.OnMessageDoneFiltering:FireClient(self.PlayerObj, messageObj, channelName)
		end
	end)
	if not success and err then
		print("Error sending internal filtered message: " ..err)
	end
end
