From 507fa5af8956cd53b8093484e390379adc99065a Mon Sep 17 00:00:00 2001 From: Mis012 Date: Thu, 18 May 2017 20:24:54 +0200 Subject: [PATCH] Added color to username for better visual differentiation Tested on linux. Room for improvement: a) make the color a variable at the top of the file b) pull the color from twitch (if possible) --- hirc.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hirc.py b/hirc.py index 51b5240..8ca9dc4 100644 --- a/hirc.py +++ b/hirc.py @@ -7,8 +7,8 @@ # change it to your own # get your oauth here: https://twitchapps.com/tmi/ -nickname = 'twitch_plays_3ds' -oauth = 'oauth:qmdwk3rsm4qau59zf2dpxixsf4wxzf' +nickname = 'Mis012' +oauth = 'oauth:rb6ki1vmhcbebm8la7a0yp1rngm8dp' def ensure_dir(dir_path): if not os.path.exists(dir_path): @@ -53,11 +53,11 @@ def log_msg(name, msg): for item in [x for x in tmi_list if "." not in x.username]: message_orig = item.message.replace(chr(1) + "ACTION", "/me").replace(chr(1), '').lstrip().rstrip() log_msg(item.username, message_orig) - safe_print(item.username + ": " + message_orig) + safe_print("\033[94m" + item.username + "\033[0m: " + message_orig) if last_message != '': safe_print(">> " + nickname + ": " + last_message) bot.send_message(last_message) log_msg(nickname, last_message) last_message = '' - time.sleep(0.01) \ No newline at end of file + time.sleep(0.01)