sendmsg (Irc::IrcBot)

    # File rbot/ircbot.rb, line 243
      def sendmsg(type, where, message)
        # limit it 440 chars + CRLF.. so we have to split long lines
        left = 440 - type.length - where.length - 3
        if(left >= message.length)
          log_sent(type, where, message)
          @socket.puts("#{type} #{where} :#{message}")
        else
          debug "Line too long, splitting"
          begin
            line = message.slice!(0, left)
            lastspace = line.rindex(/\s+/)
            if(lastspace)
              message = line.slice!(lastspace, line.length) + message
              message.gsub!(/^\s+/, "")
            end
            @socket.puts("#{type} #{where} :#{line}")
            log_sent(type, where, line)
          end while(message.length > 0)
        end
      end