From 491341555b301ea609872127b3838488d535c8f0 Mon Sep 17 00:00:00 2001 From: MrStonedOne Date: Sat, 25 Oct 2014 17:49:23 -0700 Subject: [PATCH 1/2] Removes an annoying and stupid message in the bot When ever the bot sees an https link for youtube in the channel, it bitches to the channel that "Secure Youtube does NOT exist". Protip bot: nobody cares. --- bot/NanoTrasenBot.py | 63 ++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 35 deletions(-) diff --git a/bot/NanoTrasenBot.py b/bot/NanoTrasenBot.py index e86009ef580..a55c1696575 100644 --- a/bot/NanoTrasenBot.py +++ b/bot/NanoTrasenBot.py @@ -902,41 +902,34 @@ while True: print truesender+":"+temdata arg = temdata check = temdata.lower() - if check[0:5] == "https": - if len(temporal_list) == 1: - conn.privmsg(targetchannel,sender+" :Secure Youtube does NOT exist") - break - else: - temporal_list2.append("Secure Youtube does NOT exist") - break - else: - if cache_youtube_links == True: - result = YTCV2(arg) - else: - result = YTCV2(arg,0) - if type(result) == str: - ### To remove =" - if result[0:4] == 'nt="': - result = result[4:] - pass - elif result[0:2] == '="': - result = result[2:] - pass - else: - pass - if """ in result: - result.replace(""",'"') - if len(temporal_list) == 1: - conn.privmsg(targetchannel,sender+" : "+result) - break - else: - temporal_list2.append(result) - else: - if len(temporal_list) == 1: - conn.privmsg(targetchannel,sender+" : The video does not exist") - break - else: - temporal_list2.append("The video does not exist") + + if cache_youtube_links == True: + result = YTCV2(arg) + else: + result = YTCV2(arg,0) + if type(result) == str: + ### To remove =" + if result[0:4] == 'nt="': + result = result[4:] + pass + elif result[0:2] == '="': + result = result[2:] + pass + else: + pass + if """ in result: + result.replace(""",'"') + if len(temporal_list) == 1: + conn.privmsg(targetchannel,sender+" : "+result) + break + else: + temporal_list2.append(result) + else: + if len(temporal_list) == 1: + conn.privmsg(targetchannel,sender+" : The video does not exist") + break + else: + temporal_list2.append("The video does not exist") if len(temporal_list) == 1: pass else: From 0f8cb44ddba04af5feaf62abb0fdbb69b0cfbaaa Mon Sep 17 00:00:00 2001 From: MrStonedOne Date: Sat, 25 Oct 2014 18:35:22 -0700 Subject: [PATCH 2/2] fixes fuckup in intent, does this the shitty way since i can't into python --- bot/NanoTrasenBot.py | 64 +++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/bot/NanoTrasenBot.py b/bot/NanoTrasenBot.py index a55c1696575..816049cab99 100644 --- a/bot/NanoTrasenBot.py +++ b/bot/NanoTrasenBot.py @@ -902,34 +902,42 @@ while True: print truesender+":"+temdata arg = temdata check = temdata.lower() - - if cache_youtube_links == True: - result = YTCV2(arg) - else: - result = YTCV2(arg,0) - if type(result) == str: - ### To remove =" - if result[0:4] == 'nt="': - result = result[4:] - pass - elif result[0:2] == '="': - result = result[2:] - pass - else: - pass - if """ in result: - result.replace(""",'"') - if len(temporal_list) == 1: - conn.privmsg(targetchannel,sender+" : "+result) - break - else: - temporal_list2.append(result) - else: - if len(temporal_list) == 1: - conn.privmsg(targetchannel,sender+" : The video does not exist") - break - else: - temporal_list2.append("The video does not exist") + if check[0:5] == "https": + if len(temporal_list) == 1: + #commenting out rather then remove the if and else because this uses odd spaced based indenting that doesn't seem to play well with notepad++ and im not fucking with that. attempting to do so broke everything already and i can't into python. so this works + #conn.privmsg(targetchannel,sender+" :Secure Youtube does NOT exist") + #break + else: + #temporal_list2.append("Secure Youtube does NOT exist") + break + else: + if cache_youtube_links == True: + result = YTCV2(arg) + else: + result = YTCV2(arg,0) + if type(result) == str: + ### To remove =" + if result[0:4] == 'nt="': + result = result[4:] + pass + elif result[0:2] == '="': + result = result[2:] + pass + else: + pass + if """ in result: + result.replace(""",'"') + if len(temporal_list) == 1: + conn.privmsg(targetchannel,sender+" : "+result) + break + else: + temporal_list2.append(result) + else: + if len(temporal_list) == 1: + conn.privmsg(targetchannel,sender+" : The video does not exist") + break + else: + temporal_list2.append("The video does not exist") if len(temporal_list) == 1: pass else: