code: async def message(self, target, message):
          
          hostmask = self._format_user_mask(self.nickname)
          # Leeway.
          chunklen = protocol.MESSAGE_LENGTH_LIMIT - len(
              '{hostmask} PRIVMSG {target} :'.format(hostmask=hostmask, target=target)) - 25
  
          for line in message.replace('\r', '').split('\n'):
              for chunk in chunkify(line, chunklen):
                  # Some IRC servers respond with "412 Bot :No text to send" on empty messages.
                  await self.rawmsg('PRIVMSG', target, chunk or ' ')
docs: Message channel or user.