diff --git a/main.py b/main.py index e7dcc3f..a11743c 100755 --- a/main.py +++ b/main.py @@ -33,7 +33,8 @@ confArgList = ["", ""] for line in configFile: for letter in line: - if letter == ' ': + if letter == ':': + confArgList[confArgNumber] = confArgList[confArgNumber] + ":" confArgNumber = confArgNumber + 1 elif letter == ',': confArgList.append(",") @@ -43,12 +44,12 @@ for line in configFile: confArgList[confArgNumber] = confArgList[confArgNumber] + letter except Exception: confArgList.append(letter) -print(confArgList) for word in confArgList: if "\n" in word: confArgList[confArgList.index(word)] = word.replace("\n", "") - -print(confArgList) +for word in confArgList: + if word == "motd:": + motd = confArgList[confArgList.index(word) + 1] # Write the time to the history file historyFile = open((expanduser("~") + "/.history.mash"), "a") @@ -56,8 +57,8 @@ historyFile.write("\n") historyFile.write(("Session on " + str(datetime.now()))) historyFile.write("\n") -# Welcome message. Probably going to be configurable soon enough. -print("Welcome to Mash, " + user + "@" + socket.gethostname() + "! Mash is currently on version " + version) +# Welcome message. Configurable with "motd: (your motd here)," +print(motd) # Main loop. try: