def send(text, notice = false)
      # TODO deprecate `notice` argument, put splitting into own
      # method
      text = text.to_s
      split_start = @bot.config.message_split_start || ""
      split_end   = @bot.config.message_split_end   || ""
      command = notice ? "NOTICE" : "PRIVMSG"
      prefix = ":#{@bot.mask} #{command} #{@name} :"

      text.lines.map(&:chomp).each do |line|
        splitted = split_message(line, prefix, split_start, split_end)

        splitted[0, (@bot.config.max_messages || splitted.size)].each do |string|
          @bot.irc.send("#{command} #@name :#{string}")
        end
      end
    end
def send(text, notice = false)
      # TODO deprecate `notice` argument, put splitting into own
      # method
      text = text.to_s
      split_start = @bot.config.message_split_start || ""
      split_end   = @bot.config.message_split_end   || ""
      command = notice ? "NOTICE" : "PRIVMSG"
      prefix = ":#{@bot.mask} #{command} #{@name} :"

      text.lines.map(&:chomp).each do |line|
        splitted = split_message(line, prefix, split_start, split_end)

        splitted[0, (@bot.config.max_messages || splitted.size)].each do |string|
          @bot.irc.send("#{command} #@name :#{string}")
        end
      end
    end
Sends a PRIVMSG to the target.

 @param [#to_s] text the message to send
 @param [Boolean] notice Use NOTICE instead of PRIVMSG?
 @return [void]
 @see #safe_msg
 @note The aliases `msg` and `privmsg` are deprecated and will be
   removed in a future version.