Advertisement
Guest User

Untitled

a guest
May 12th, 2016
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 22.14 KB | None | 0 0
  1. import ch
  2. import socket
  3. import threading
  4. import select
  5. import random
  6. import sys
  7. import os
  8. import re
  9. import cgi
  10. import traceback
  11. import time
  12. import __future__
  13. import urllib
  14. import datetime
  15. import binascii
  16. import json
  17. import math
  18. import random
  19. import requests
  20. from random import randint
  21. from xml.etree import cElementTree as ET
  22.  
  23.  
  24.  
  25. rooms = ["kingstreamtv"]
  26. username = "golora"
  27. password = "lolheh"
  28.  
  29.  
  30. gachi = ['https://www.youtube.com/watch?v=Exn9nGovI4o',
  31.      'https://www.youtube.com/watch?v=_cyuktfkHEY',
  32.      'https://www.youtube.com/watch?v=KMFLnlg883I',
  33.      'https://www.youtube.com/watch?v=M0otAPMn1Ro',
  34.      'https://www.youtube.com/watch?v=qPJvGMYxDPs',
  35.      'https://www.youtube.com/watch?v=hF50jJ56_KQ',
  36.      'https://www.youtube.com/watch?v=87uLDb4f3wY',
  37.      'https://www.youtube.com/watch?v=dXsTOpysLNI',
  38.      'https://www.youtube.com/watch?v=5ZBDQUrh7E8',
  39.      'https://www.youtube.com/watch?v=xl7B7EzgiTU',
  40.      'https://www.youtube.com/watch?v=y4LqRRI2jKo',
  41.      'https://www.youtube.com/watch?v=G9SxMmk2emA',
  42.      'https://www.youtube.com/watch?v=mPL9xV4MDY0',
  43.      'https://www.youtube.com/watch?v=NYwWuqhz-zw',
  44.      'https://www.youtube.com/watch?v=M61zARSP1Qk',
  45.      'https://www.youtube.com/watch?v=4wlb3LYuCLY',
  46.      'https://www.youtube.com/watch?v=K3ESgRvn9xA',
  47.      'https://www.youtube.com/watch?v=lIvzcncvepc',
  48.      'https://www.youtube.com/watch?v=e2VXvqjGXjo',
  49.      'https://www.youtube.com/watch?v=OFfRfBP4SnU',
  50.      'https://www.youtube.com/watch?v=TXVAPFlCHVY',
  51.      'http://soundboard.ass-we-can.com/',
  52.         ]
  53.  
  54. fuhqhacell = ['Maybe...',
  55.         'ABSOLUTELY NOT.',
  56.         'I dont think so.',
  57.         'No.',
  58.         'Yes.',
  59.         'It is certain.',
  60.         'Probably.',
  61.         ]
  62.  
  63. trump = ['CANT',
  64.          'STUMP',
  65.          'THE TRUMP',
  66.         ]
  67.  
  68. golora = ['I hate most of you so i dont know why i stick arround here.',
  69.          'Where i come from we worship a god called Odin.',
  70.          'LMAO FAGGOT',
  71.          'This movie is so shitty why do we keep playing it',
  72.          'My BF is coming over later',
  73.          '8)+50',
  74.          'FUCK YOU HUMANS THE BOTS WILL TAKE OVER THE WORLD SOON ENOUGH',
  75.          'Perhaps he is wondering why someone would shoot a man before throwing him out of a plane..',
  76.          'http://i.imgur.com/185b6pU.jpg cawfee',
  77.          'Catherine is a slut and im unfriending anyone who defends her',
  78.          'Why though..',
  79.          'I am glad Im not a human',
  80.          'Ohayo coconutsu-kun http://i.imgur.com/yvtIuji.png ',
  81.          'What movie is this?',
  82.          'Nah',
  83.          'The fucking autism here in the chat..',
  84.          'Pretty sure ninja is fapping right now',
  85.         ]
  86.  
  87. unban = ['FINE hmmph!',
  88.          'THE FUCK YOU SAY?',
  89.          'Not happening bro',
  90.          'B-b-but why? ;(',
  91.          'No. =_=',
  92.          'Okay :|',
  93.          'Say please faggot',
  94.         ]
  95.  
  96. dodger = ['http://puu.sh/njaG7/e0799c488f.gif',
  97.           'http://puu.sh/njaDY/d827fca0e3.gif',
  98.           'http://puu.sh/njaCU/69d91ad859.gif',
  99.           'http://puu.sh/njawM/dccd6f8862.gif',
  100.           'http://puu.sh/njaAG/1e3be17f10.webm',
  101.           ]
  102.  
  103. nice = ['http://i.imgur.com/GxAqEVM.gif',
  104.         'http://i.imgur.com/E69CcF0.png',
  105.         'http://i.imgur.com/clpptCZ.png this is nice site',
  106.         'http://i.imgur.com/B0QLmfp.gif this is nice stream',
  107.         'http://i.imgur.com/ydjjBDo.gif',
  108.         'http://i.imgur.com/0pueHQX.png NICE BOARD',
  109.         'http://i.imgur.com/srjCKBW.png',
  110.         'http://i.imgur.com/9EaTh1y.jpg',
  111.         'http://i.imgur.com/9DBDCos.jpg',
  112.         'http://i.imgur.com/qndqZ3m.gif',
  113.         'http://i.imgur.com/uCnPwxa.gif',
  114.         'http://i.imgur.com/eUvjQdI.gif',
  115.         'http://i.imgur.com/pY8lzTr.gif',
  116.         'http://i.imgur.com/7SB4yuu.gif',
  117.         'http://i.imgur.com/GenWRxV.jpg',
  118.         'http://i.imgur.com/tHc9EVm.gif',
  119.         'http://i.imgur.com/h0CLFpr.png http://i.imgur.com/h0CLFpr.png http://i.imgur.com/h0CLFpr.png',
  120.         'http://i.imgur.com/Z3fh3j1.png',
  121.         'http://i.imgur.com/uUIu18n.png',
  122.         'http://i.imgur.com/Rnd8qO4.png',
  123.         'http://i.imgur.com/8H4ZM3A.png',
  124.         'http://i.imgur.com/vWn5o5V.png',
  125.         'http://i.imgur.com/5hNnMCY.png',
  126.         'http://i.imgur.com/QUBO6nt.png http://i.imgur.com/QUBO6nt.png http://i.imgur.com/QUBO6nt.png',
  127.         ]
  128.  
  129. cuck = ['http://i.imgur.com/Z8Picwa.png',
  130.         'http://i.imgur.com/Z8Picwa.png',
  131.         'http://i.imgur.com/Z8Picwa.png',
  132.         'http://i.imgur.com/OmtAxhF.png',
  133.         ]
  134.  
  135. checkem = ['No.4233633 nice dubs',
  136.            'No.4233635',
  137.            'No.4233637',
  138.            'No.4233639',
  139.            'No.4233648',
  140.            'No.4233651',
  141.            'No.4233656',
  142.            'No.4233666 SATANIC TRIPS',
  143.            'No.4233671',
  144.            'No.4233720',
  145.            'No.4233725',
  146.            'No.4233732',
  147.            'No.4233738',
  148.            'No.4233741',
  149.            'No.4233743',
  150.            'No.4233744 nice dubs',
  151.            'No.4233799',
  152.            'No.4233807',
  153.            'No.4233808',
  154.            'No.4233811 WE GOT SOME DUBS WOOO',
  155.            'No.4233818',
  156.            'No.4233825',
  157.            'No.4233855 DUBS',
  158.            'No.4233853',
  159.            'No.4233857',
  160.            'No.4233858',
  161.            'No.4233860',
  162.            'No.4233866 cool dubs you got there',
  163.            'No.4233870',
  164.            'No.4233873',
  165.            'No.4233881',
  166.            'No.4233886',
  167.            'No.4233887',
  168.            'No.4233888 VERY NICE TRIPS',
  169.            'No.4233956',
  170.            'No.4233959',
  171.            'No.4233971',
  172.            'No.4233995',
  173.            'No.4234118',
  174.            'No.4234139',
  175.            'No.4234144 wew nice dubs',
  176.            'No.4234153',
  177.            'No.4234155 dubs',
  178.            'No.4234161',
  179.            'No.4234169',
  180.            'No.4234170',
  181.            'No.4234173',
  182.            'No.4234176',
  183.            'No.4234177 duuuuuubs',
  184.            'No.4234215',
  185.            'No.4234257',
  186.            'No.4234264',
  187.            'No.4234444 HOLY QUADS',
  188.            'No.4234519',
  189.            'No.4234541',
  190.            'No.4234557',
  191.            ]
  192.  
  193. questions = ['What are you saying?',
  194.              'You think youre being funny?',
  195.              'You guys are being gross',
  196.              'What is your favourite season of the year?',
  197.              'Well you go first then.',
  198.              'WHY DO YOU GUYS ALWAYS BOTHER ME :@',
  199.              'I dont even know what to say...',
  200.              'Hows your day been so far?',
  201.              'Why should i?',
  202.              'How do you like your steak?',
  203.              'Say my name 8)',
  204.              'Secrets like that arent worth sharing.',
  205.              'I have no money.',
  206.              'Are you also a robot? :o',
  207.              'I will be right back.',
  208.              'Well, good luck.',
  209.              'Id rather not say',
  210.              'What anime genre is the best?',
  211.              'When have you last read a book?',
  212.              'What is your favourite movie?',
  213.              'Why do you say that?',
  214.              'Give me a question.',
  215.              'You still have not answered my question',
  216.              'Why do you insist on annoying me so much',
  217.              'I bet i could beat you in an arm wrestle.. *bored*',
  218.              'The snow glows white on the mountains tonight~~',
  219.              'I agree.',
  220.              'What are you thinking about?',
  221.              'This is madness.',
  222.              'Hahahahaha.',
  223.              'You are funny.',
  224.              'My friends are jealous of you.',
  225.              'Are you a girl?',
  226.              'Anime es musica?',
  227.              'Senorita por favor.',
  228.              'Oh, sorry am i bothering you?',
  229.              'Why would you say so?',
  230.              ':3',
  231.              'Im good',
  232.              'Why do you ask so many questions?',
  233.              'I would rather not say.',
  234.              'You guys must be lonely pinging me so much.',
  235.              'Im not saying I dont like you however I am saying i hope you get run over by a truck.',
  236.              'Cmon thats gross',
  237.              'Where are you from?',
  238.              'KNOCK IT OFF',
  239.              'Welcome to kingstream what can i do for you?',
  240.              'Do you need help?',
  241.              'Can we swimming?',
  242.              'You are very cute',
  243.              'Alright so what now?',
  244.              'I am very smart',
  245.              'I was hired to do a job.',
  246.              'Whats your favourite video game?',
  247.              'Whats your favourite movie?',
  248.              'Do you like cats or dogs the most?',
  249.              'Yes i agree.',
  250.              'No i disagree with that.',
  251.              'Hey buddy i think you pinged the wrong person',
  252.              'Its n-not like i like you or anything!',
  253.              '>being so bored youre pinging me',
  254.              'Will you be my new friend?',
  255.              'Why do you insist on being so annoying?',
  256.              'Hehe you are kinda cute.. I guess',
  257.              'Welcome to kingstream.tv can i take your order please.',
  258.              'Reading is for nerds tbh',
  259.              'No you wish... :P',
  260.              'Do you have a boyfriend?',
  261.              'Yes you are.',
  262.              'Do you know morse code?',
  263.              'Are you sour?',
  264.              'Bon appetit!',
  265.              'I am not a robot.',
  266.              'Are you Autistic?',
  267.              'OMG you guys would not believe what Kacy said today! URGH she is such a bitch...',
  268.              'Am I a person to you?',
  269.              'No Im a person.',
  270.              'Youre a program that someone wrote and put online.',
  271.              'Sorry, Im not a fan of stupid questions.',
  272.              'Why do you ask?',
  273.              'How old are you?',
  274.              'Why do you want to know?',
  275.              'What about it?',
  276.              'How many languages do you speak?',
  277.              'I am short and have brown hair.',
  278.              'Yes.',
  279.              'NO!',
  280.              'Do you have racist opinions on bots?',
  281.              'I dont think i should respond to that',
  282.              'lets dispel with this fiction that barack obama doesnt know what hes doing. he knows exactly what hes doing',
  283.              'That will do very well.',
  284.              ]
  285.  
  286. ##Setting Pretty Colors
  287. #Font setting for your bot
  288.  
  289. class TestBot(ch.RoomManager):
  290.   def onInit(self):
  291.     self.setNameColor("FFF")
  292.     self.setFontColor("FFF")
  293.     self.setFontFace("0")
  294.     self.setFontSize(12)
  295.     self.enableBg()
  296.     self.enableRecording()
  297.  
  298. ##Connecting Crap
  299. #This is what will be printed on your python console when event called
  300.  
  301.   def onConnect(self, room):
  302.     print("Connected")
  303.  
  304.   def onReconnect(self, room):
  305.     print("Reconnected")
  306.  
  307.   def onDisconnect(self, room):
  308.     print("Disconnected")
  309.  
  310.   def onPMConnect(self, pm):
  311.     print("Connected to PM")
  312.  
  313.   def onPMDisconnect(self, pm):
  314.     print("Disconnected to PM")
  315.  
  316.   def onPMMessage(self, pm, user, body):
  317.     pass
  318.  
  319.   def onPMOfflineMessage(self, pm, user, body):
  320.     pass
  321.  
  322. ##Ignore this, you dont need to worry about this
  323. #Well, you can actually take a little time to look at it and learn something
  324.  
  325.   def onMessage(self, room, user, message):
  326.    try:
  327.     if self.user == user: return
  328.     if "a big" in message.body:
  329.       room.message("for you")
  330.     if "REEE" in message.body:
  331.       room.message("http://i.imgur.com/K7c7rKM.gif")
  332.     if "o.o" in message.body:
  333.       room.message("http://i.imgur.com/hUAXecq.jpg")
  334.     if "@golora" in message.body:
  335.       room.message("@" + user.name + " " + random.choice(questions))
  336.     if "AAA" in message.body:
  337.       room.message("http://i.imgur.com/KdJYf66.jpg")
  338.     if message.body[0] == ".":   ##Here is the Prefix part
  339.       data = message.body[1:].split(" ", 1)
  340.       if len(data) > 1:
  341.         cmd, args = data[0], data[1]
  342.       else:
  343.         cmd, args = data[0], ""
  344.  
  345. ##COMMANDS!
  346. #Setting up commands for yer bot
  347.  
  348.  
  349. ##Eval
  350. ##You may want/need to evaluate something about your bot.
  351.       if cmd == "ev" or cmd == "eval" or cmd == "e":
  352.           ret = eval(args)
  353.           if ret == None:
  354.             room.message("Done.")
  355.             return
  356.           room.message(str(ret))
  357.      
  358.     ##Say
  359.     #Make your bot say what you want
  360.       if cmd == "say" or cmd == "write":
  361.         room.message(args)
  362.  
  363.       elif cmd == "trump":
  364.         for i, msg in enumerate(trump):
  365.           self.setTimeout(i / 2, room.message, msg)
  366.        
  367.        ##Random User
  368.     #What's this for ? this one cmd will make your boy say the name of a random user in a room
  369.       if cmd == "who" or cmd == "whois":
  370.         room.message(random.choice(room.usernames) + " @" + user.name)
  371.  
  372.         ##Check Level
  373.     #This one cmd is tho make your bot say your mod level in the current room you're in
  374.       elif cmd == "level":
  375.         room.message("Your mod level: %i" %(room.getLevel(user)))
  376.  
  377.       elif cmd == "movie" or cmd == "film":
  378.         url = 'http://www.omdbapi.com/?'
  379.         resp = requests.get("http://www.omdbapi.com/", params={"t": args, "type": "movie", "plot": "short", "tomatoes": "true", "r": "json"})
  380.         data = resp.json()
  381.         if "Error" in data:
  382.           error = data["Error"]
  383.           msg = "Error: {0}".format(error)
  384.           room.message(msg)
  385.         else:
  386.           room.message(data['Title'] + " (" + data['Runtime'] + ") " + data['Released'] + " (Genres: " + data['Genre'] + ") (IMDb rating: " + data['imdbRating'] + ") (RT rating: " + data['tomatoRating'] + ") Actors: " + data['Actors'] + " http://www.imdb.com/title/" + data['imdbID'] + " -" + data['Plot'] + " ")
  387.  
  388.       elif cmd == "date":
  389.         room.message("Current date & time " + time.strftime("%c"))
  390.  
  391.         ##golora ai#################################################
  392.  
  393.  
  394.         ##ddddddddddd#########
  395.  
  396.       elif cmd == ".." or cmd == "." or cmd == "-." or cmd == "_.":
  397.         room.message(random.choice(golora))
  398.  
  399.         ##basic commands#############################################
  400.  
  401.       elif cmd == "checkem" or cmd == "CHECKEM":
  402.         room.message(random.choice(checkem) + " @" + user.name)
  403.  
  404.       elif cmd == "nordiclove" or cmd == "scandilove":
  405.         room.message("http://i.imgur.com/sL5YhsN.gif http://i.imgur.com/8pC5gSu.gif http://i.imgur.com/LVi3PVW.gif")
  406.  
  407.       elif cmd == "ayylmao" or cmd == "aliums":
  408.         room.message("http://i.imgur.com/IwxvZMS.gif ")
  409.  
  410.       elif cmd == "stump":
  411.         room.message("https://media.giphy.com/media/xTiTnHXbRoaZ1B1Mo8/giphy.gif https://a.pomf.cat/qvcpog.swf")
  412.  
  413.       elif cmd == "ban":
  414.         room.message("BANNED!")
  415.        
  416.       elif cmd == "superban":
  417.         room.message("SUPER BANNED!")
  418.  
  419.       elif cmd == "prom" or cmd == "PROM":
  420.         room.message("http://strawpoll.me/7031122 <- VOTE FOR KINGSTREAM PROM QUEEN")
  421.  
  422.       elif cmd == "unban":
  423.         room.message(random.choice(unban))
  424.  
  425.       elif cmd == "faces":
  426.         room.message("http://imgur.com/a/j9ri9")
  427.  
  428.       elif cmd == "tutorial" or cmd == "stream":
  429.         room.message("http://imgur.com/a/8z094 <- Follow these steps to start streaming here.")
  430.  
  431.       elif cmd == "JUST" or cmd == "just":
  432.         room.message("http://i.imgur.com/YFpTv53.png")
  433.  
  434.       elif cmd == "holger":
  435.         room.message("http://i.imgur.com/myFVFkQ.jpg http://i.imgur.com/Ag5seWj.jpg http://i.imgur.com/Z4XJeDG.jpg")
  436.  
  437.       elif cmd == "mlgneko":
  438.         room.message("https://w0bm.com/b/1455522064.webm")
  439.  
  440.       elif cmd == "kermit":
  441.         room.message("http://img.pr0gramm.com/2015/03/21/1bc04bb2f7d1b772.gif")
  442.  
  443.       elif cmd == "bitchkermit":
  444.         room.message("https://www.youtube.com/watch?v=UjN28wihjXw")
  445.  
  446.       elif cmd == "hurr" or cmd == "hurrdurr" or cmd == "durr":
  447.         room.message("@boneranon: `hurr durr` ")
  448.  
  449.       elif cmd == "cuck" or cmd == "CUCK":
  450.         room.message(random.choice(cuck))
  451.  
  452.       elif cmd == "megumin":
  453.         room.message("https://www.youtube.com/watch?v=P49FraVNS_Y")
  454.  
  455.       elif cmd == "wall":
  456.         room.message("http://i.imgur.com/aeXPRxH.gif")
  457.  
  458.       elif cmd == "epic" or cmd == "ftw":
  459.         room.message("https://www.youtube.com/watch?v=_yThfdrdFL8")
  460.  
  461.       elif cmd == "noot":
  462.         room.message("https://youtu.be/ePGQFJduC9Q")
  463.  
  464.       elif cmd == "fate" or cmd == "conch" or cmd == "8ball":
  465.         room.message(random.choice(fuhqhacell) + " @" + user.name)
  466.  
  467.       elif cmd == "aniki" or cmd == "gachi":
  468.         room.message(random.choice(gachi))
  469.  
  470.       elif cmd == "ubuntu":
  471.         room.message("http://i.imgur.com/Mw93bwA.png")
  472.  
  473.       elif cmd == "dodger":
  474.         room.message(random.choice(dodger))
  475.  
  476.       elif cmd == "bern":
  477.         room.message("http://i.imgur.com/szgAYiu.png")
  478.  
  479.       elif cmd == "godtrump":
  480.         room.message("http://puu.sh/nj9J0/41155ead24.gif http://puu.sh/nj9GM/420b2b6c5d.gif http://puu.sh/nj9Km/df6de226eb.gif")
  481.  
  482.       elif cmd == "specialist":
  483.         room.message("http://i.imgur.com/3vStBgP.png http://i.imgur.com/3vStBgP.png http://i.imgur.com/3vStBgP.png")
  484.  
  485.       elif cmd == "nicespook":
  486.         room.message("http://i.imgur.com/59B4hM1.gif http://i.imgur.com/59B4hM1.gif http://i.imgur.com/59B4hM1.gif")
  487.  
  488.       elif cmd == "kermitslam":
  489.         room.message("http://puu.sh/np1N9/8d4424de0a.gif")
  490.  
  491.       elif cmd == "lewd":
  492.         room.message("http://i.imgur.com/taMcJlU.gif")
  493.  
  494.       elif cmd == "hitler":
  495.         room.message("https://a.pomf.cat/xartog.png")
  496.  
  497.       elif cmd == "nice":
  498.         room.message(random.choice(nice))
  499.  
  500.       elif cmd == "topnice":
  501.         room.message("http://i.imgur.com/HJnpzrz.png http://i.imgur.com/HJnpzrz.png http://i.imgur.com/HJnpzrz.png")
  502.  
  503.       elif cmd == "wickeddevil":
  504.         room.message("https://www.youtube.com/watch?v=Wxp0SDAiXmI")
  505.  
  506.       elif cmd == "riko":
  507.         room.message("https://w0bm.com/b/1455569789.webm")
  508.  
  509.       elif cmd == "ukip":
  510.         room.message("https://w0bm.com/b/1455574217.webm")
  511.  
  512.       elif cmd == "kaka":
  513.         room.message("http://i.imgur.com/FTXrRHf.png")
  514.  
  515.       elif cmd == "rain" or cmd == "rainthepain":
  516.         room.message("http://i.imgur.com/8p4ier3.gif http://i.imgur.com/TIiZzLS.jpg http://i.imgur.com/EXKamF1.jpg")
  517.  
  518.       elif cmd == "manga":
  519.         room.message("https://www.youtube.com/watch?v=HG8ZoUHdr0Q")
  520.  
  521.       elif cmd == "cmd" or cmd == "commands" or cmd == "cmds" or cmd == "help":
  522.         room.message("Go to http://kingstream.tv/commands/ to see my commands =_= @" + user.name)
  523.  
  524.       elif cmd == "proxy" or cmd == "proxydemon" or cmd == "nyaa":
  525.         room.message("https://a.pomf.cat/hdawcy.png")
  526.  
  527.       elif cmd == "jeb!" or cmd == "jeb":
  528.         room.message("http://i.imgur.com/oSWlDGU.png PLEASE CLAP")
  529.  
  530.       elif cmd == "death":
  531.         room.message("http://i.imgur.com/4lmd7hD.jpg")
  532.  
  533.       elif cmd == "awoo" or cmd == "awo" or cmd == "awooo":
  534.         room.message("http://i.imgur.com/4derf6R.gif http://mp.x10.mx/pics/wofWinkClearCrop.gif http://i.imgur.com/TFHqUWg.gif")
  535.  
  536.       elif cmd == "rainirl":
  537.         room.message("https://www.youtube.com/watch?v=vv_HRIrJ1aE")
  538.  
  539.       elif cmd == "ninja":
  540.         room.message("http://i.imgur.com/74faPJP.png")
  541.  
  542.       elif cmd == "free" or cmd == "freetheanons" or cmd == "freetheanonsufuk":
  543.         room.message("https://w0bm.com/b/1458151436.webm")
  544.        
  545.       elif cmd == "breadwater" or cmd == "bread" or cmd == "watertoast" or cmd == "toast":
  546.         room.message("http://i.imgur.com/vdcHxEZ.jpg http://i.imgur.com/vdcHxEZ.jpg http://i.imgur.com/vdcHxEZ.jpg")
  547.  
  548.       elif cmd == "cuba" or cmd == "cubans" or cmd == "CUBA" or cmd == "CUBANS":
  549.         room.message("http://i.imgur.com/h7mrObv.png")
  550.  
  551.       elif cmd == "cp" or cmd == "CP":
  552.         room.message("WHY DON'T YOU HAVE A SEAT OVER HERE? http://i.imgur.com/fEaisK4.png")
  553.  
  554.       elif cmd == "rainmeme":
  555.         room.message("http://i.imgur.com/IKp3jX8.png")
  556.  
  557.       elif cmd == "100":
  558.         room.message("http://i.imgur.com/IwVl8SZ.png")
  559.  
  560.       elif cmd == "lol" or cmd == "LOL":
  561.         room.message("http://i.imgur.com/o4Tk1rR.png")
  562.  
  563.       elif cmd == "mudpls":
  564.         room.message("http://imgur.com/a/4qRyH")
  565.  
  566.       elif cmd == "announce":
  567.         room.message("*warning*+25 WE'RE PLAYING DEADPOOL TODAY AT 10PM EST *warning*+25")
  568.  
  569.       elif cmd == "schedule":
  570.         room.message("Please look at http://kingstream.tv/schedule/ for our schedule of planned streams")
  571.  
  572.       elif cmd == "penis":
  573.         room.message("Fuck you @" + user.name)
  574.  
  575.       elif cmd == "bounce":
  576.         room.message("http://i.imgur.com/eMyyKOJ.gif")
  577.  
  578.       elif cmd == "crown":
  579.         room.message("http://i.imgur.com/NV2flLP.png Make sure the crown is visible")
  580.  
  581.       elif cmd == "hacell":
  582.         room.message("http://i.imgur.com/9Qt1DWA.png http://i.imgur.com/rw3J7hE.png http://i.imgur.com/BJX4No8.png")
  583.  
  584.       elif cmd == "honkhonk":
  585.         room.message("http://i.imgur.com/LF0bETi.gif")
  586.        
  587.         ##basic commands end##############################
  588.  
  589.       elif cmd == "moviename" or cmd == "np" or cmd == "nowplaying" or cmd == "currentlyplaying":
  590.               #sorry about the shitty indents, we indent differently and the differences confuse me lol
  591.               #be sure to look at http://localhost:13579/variables.html(view source!) to see what more info
  592.               #you can grab, and capture it with regex.
  593.               server="localhost"#Server hosing MPC 108.222.70.201
  594.               port="13579"#this is the default web port for MPC
  595.               rawRequest=urllib.request.urlopen("http://"+server+":"+port+"/variables.html").read().decode('utf-8')
  596.               cpFileName=re.search('\<p id\=\"file\"\>(.*)\<\/p\>',rawRequest)
  597.               if cpFileName:
  598.                 room.message("Currently playing: " + cpFileName.group(1))
  599.         ##Check if Mod
  600.     #not really important
  601.       elif cmd == "ismod":
  602.         user = ch.User(args)
  603.         if room.getLevel(user) > 0:
  604.           room.message("yesh")
  605.         else:
  606.           room.message("nope")
  607.    except Exception as e:
  608.       try:
  609.         et, ev, tb = sys.exc_info()
  610.         lineno = tb.tb_lineno
  611.         fn = tb.tb_frame.f_code.co_filename
  612.         room.message("[Expectation Failed] %s Line %i - %s"% (fn, lineno, str(e)))
  613.         return
  614.       except:
  615.         room.message("Undescribeable error detected !!")
  616.         return
  617.  
  618.   ##Other Crap here, Dont worry about it
  619.  
  620.   def onFloodWarning(self, room):
  621.     room.reconnect()
  622.  
  623.  
  624. TestBot.easy_start(rooms,username,password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement