def _sendMessage( self, target, message ):
		self.trace()

		# split message along max size & queue
		lines = [message[i:i+self.max_message_size] for i in range( 0, len(message), self.max_message_size )]
		for line in lines:
			self.traceMessage('	>> ' + line)
			self.queue.append( [target, line] )

		# reset last size if past delay
		if time.time() >= self.next_send:
			self.last_size = 0

		# send messages in queue
		for i in range( len(self.queue) ):
			# get message data
			(target, line) = self.queue.pop( 0 )

			# delay post if over the limit
			if time.time() < self.next_send:
				# wait until throttle expires
				time.sleep( self.next_send - time.time() )

				# extend wait if last message was particularly large
				if self.last_size > (0.5 * self.max_message_size):
					time.sleep( self.throttle )
				if self.last_size > (0.9 * self.max_message_size):
					time.sleep( self.throttle )

			# send message
			self.server.privmsg( target, self.Encode(line) )
			self.last_size = len(line)
			self.next_send = time.time() + self.throttle


	###################
	##	Send a message to an IRC channel
	###################
dataset/ETHPy150Open Pathoschild/stewbot/stewbot/components/IRC.py/IRC._sendMessage/original