add print out of terms-of-use to node startup

This commit is contained in:
stefanofranz 2018-06-27 13:01:33 +01:00
parent a60cd9d356
commit 1ff95c1916

View File

@ -80,6 +80,15 @@ R/ /___ /_/ / / / /_/ / /_/ / B|______ | \_| | |______ | \_ |
R\____/ /_/ \__,_/\__,_/ W____________________________________________________________________________
D""".trimStart()
val license = """
*************************************************************************************************************************************
* All rights reserved. *
* This software is proprietary to and embodies the confidential technology of R3 LLC (R3). *
* Possession, use, duplication or dissemination of the software is authorized only pursuant to a valid written license from R3. *
* IF YOU DO NOT HAVE A VALID WRITTEN LICENSE WITH R3, DO NOT USE THIS SOFTWARE. *
*************************************************************************************************************************************
"""
// Now replace the R, B and W letters with their colour code escapes to make the banner prettier.
if (Ansi.isEnabled()) {
val red = Ansi.ansi().fgBrightRed().toString()
@ -100,12 +109,14 @@ D""".trimStart()
System.lineSeparator()
println(banner)
println(license)
} else {
println(logo.replace("R", "").replace("B", "").replace("W", "").replace("D", ""))
}
}
private val tip: String get() {
private val tip: String
get() {
val tips = javaClass.getResourceAsStream("tips.txt").bufferedReader().use { it.readLines() }
return tips[(Math.random() * tips.size).toInt()]
}