2016-10-02 20:48:14 +00:00
|
|
|
from common.constants import bcolors
|
2016-05-18 17:12:46 +00:00
|
|
|
from objects import glob
|
2016-04-19 17:40:59 +00:00
|
|
|
|
2016-11-17 18:13:06 +00:00
|
|
|
def printServerStartHeader(asciiArt=True):
|
2016-09-02 10:41:19 +00:00
|
|
|
"""
|
2016-11-17 18:13:06 +00:00
|
|
|
Print server start message
|
2016-04-19 17:40:59 +00:00
|
|
|
|
2016-11-17 18:13:06 +00:00
|
|
|
:param asciiArt: print BanchoBoat ascii art. Default: True
|
|
|
|
:return:
|
2016-09-02 10:41:19 +00:00
|
|
|
"""
|
2016-09-02 15:45:10 +00:00
|
|
|
if asciiArt:
|
2016-04-19 17:40:59 +00:00
|
|
|
print("{} _ __".format(bcolors.GREEN))
|
|
|
|
print(" (_) / /")
|
|
|
|
print(" ______ __ ____ ____ / /____")
|
|
|
|
print(" / ___/ / _ \\/ _ \\/ / _ \\")
|
|
|
|
print(" / / / / /_) / /_) / / ____/")
|
|
|
|
print("/__/ /__/ .___/ .___/__/ \\_____/")
|
|
|
|
print(" / / / /")
|
|
|
|
print(" /__/ /__/\r\n")
|
|
|
|
print(" .. o .")
|
|
|
|
print(" o.o o . o")
|
|
|
|
print(" oo...")
|
|
|
|
print(" __[]__")
|
|
|
|
print(" nyo --> _\\:D/_/o_o_o_|__ u wot m8")
|
|
|
|
print(" \\\"\"\"\"\"\"\"\"\"\"\"\"\"\"/")
|
|
|
|
print(" \\ . .. .. . /")
|
|
|
|
print("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^{}".format(bcolors.ENDC))
|
|
|
|
|
|
|
|
printColored("> Welcome to pep.py osu!bancho server v{}".format(glob.VERSION), bcolors.GREEN)
|
|
|
|
printColored("> Made by the Ripple team", bcolors.GREEN)
|
2018-03-23 19:59:44 +00:00
|
|
|
printColored("> {}https://zxq.co/ripple/pep.py".format(bcolors.UNDERLINE), bcolors.GREEN)
|
2016-10-02 20:48:14 +00:00
|
|
|
printColored("> Press CTRL+C to exit\n", bcolors.GREEN)
|
2016-04-19 17:40:59 +00:00
|
|
|
|
|
|
|
def printNoNl(string):
|
|
|
|
"""
|
2016-11-17 18:13:06 +00:00
|
|
|
Print a string without \n at the end
|
2016-04-19 17:40:59 +00:00
|
|
|
|
2016-11-17 18:13:06 +00:00
|
|
|
:param string: string to print
|
|
|
|
:return:
|
2016-04-19 17:40:59 +00:00
|
|
|
"""
|
|
|
|
print(string, end="")
|
|
|
|
|
|
|
|
def printColored(string, color):
|
|
|
|
"""
|
2016-11-17 18:13:06 +00:00
|
|
|
Print a colored string
|
2016-04-19 17:40:59 +00:00
|
|
|
|
2016-11-17 18:13:06 +00:00
|
|
|
:param string: string to print
|
|
|
|
:param color: ANSI color code
|
|
|
|
:return:
|
2016-04-19 17:40:59 +00:00
|
|
|
"""
|
|
|
|
print("{}{}{}".format(color, string, bcolors.ENDC))
|
|
|
|
|
|
|
|
def printError():
|
2016-09-02 10:41:19 +00:00
|
|
|
"""
|
2016-11-17 18:13:06 +00:00
|
|
|
Print a red "Error"
|
|
|
|
|
|
|
|
:return:
|
2016-09-02 10:41:19 +00:00
|
|
|
"""
|
2016-04-19 17:40:59 +00:00
|
|
|
printColored("Error", bcolors.RED)
|
|
|
|
|
|
|
|
def printDone():
|
2016-09-02 10:41:19 +00:00
|
|
|
"""
|
2016-11-17 18:13:06 +00:00
|
|
|
Print a green "Done"
|
|
|
|
|
|
|
|
:return:
|
2016-09-02 10:41:19 +00:00
|
|
|
"""
|
2016-04-19 17:40:59 +00:00
|
|
|
printColored("Done", bcolors.GREEN)
|
|
|
|
|
|
|
|
def printWarning():
|
2016-09-02 10:41:19 +00:00
|
|
|
"""
|
2016-11-17 18:13:06 +00:00
|
|
|
Print a yellow "Warning"
|
|
|
|
|
|
|
|
:return:
|
2016-09-02 10:41:19 +00:00
|
|
|
"""
|
2016-04-19 17:40:59 +00:00
|
|
|
printColored("Warning", bcolors.YELLOW)
|