Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ############################################################################
- ############################################################################
- #### Getting Started Bot ############
- #### File = ExampleBot.py ############
- #### Originaly by = TryHardHusky ############
- #### Edited by = 0rX ############
- #### you can PM for info about making a chatango ############
- #### bot in http://0rx.chatango.com, and you can ############
- #### and you can also chat in : ############
- #### http://monosekai.chatango.com ############
- ############################################################################
- ############################################################################
- ##Importing Random Crap xD
- #here you can see that you're importing ch library
- import ch
- import random
- import sys
- import sntonick
- import json
- import youtube
- import time
- import googleSearch
- import re
- if sys.version_info[0] > 2:
- import urllib.request as urlreq
- else:
- import urllib2 as urlreq
- wordtodaytime = dict()
- ##Dance moves!
- #kinda useless
- dancemoves = [
- "(>^.^)>",
- "(v^.^)v",
- "v(^.^v)",
- "<(^.^<)"
- ]
- ## definitions
- dictionary = dict() #volatile..
- f = open("definitions.txt", 'r') #read-only
- print("[INF]Loading Definitions...")
- for line in f.readlines():
- try:
- if len(line.strip())>0:
- word, definitions, name = json.loads(line.strip())
- dictionary[word] = json.dumps([definitions, name])
- except:
- print("{ERROR]Cant load Definitions: %s" % line)
- f.close()
- #########################################
- ##Guess the number game variable
- #########################################
- answer = ""
- def numbergame():
- randomnumber= random.choice(["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99","100"])
- answer=randomnumber
- return answer
- ##### Pars Def
- def pars(args):
- args=args.lower()
- userlist = roomUsers()
- for name in userlist:
- if args in name:return name
- #### Notif
- notif = []
- f = open("notif.txt", "r")
- print("[INF]Loading Notifs...")
- for name in f.readlines():
- if len(name.strip())>0: notif.append(name.strip())
- f.close
- #### LOCKS
- locks = []
- f = open("locks.txt", 'r')
- for name in f.readlines():
- if len(name.strip())>0: locks.append(name.strip())
- f.close()
- ## Send Notes
- sasaran = dict()
- f = open ("notes.txt", "r") #read-only
- print("[INF] Loading Notes")
- time.sleep(1)
- for line in f.readlines():
- try:
- if len(line.strip())>0:
- to, body, sender = json.loads(line.strip())
- sasaran[to] = json.dumps([body, sender])
- except:
- print("[Error] Notes load fails : %s" % line)
- f.close()
- #### Ranking #####
- # 10
- owners = ["thestro","wi3n","tranquilaa"]
- nicks = ["thestro"]
- # 1
- whitelist = ["thestro","xpe"]
- # 2
- friend = ["thestro"]
- # 0
- blacklist = ["messedhat"]
- # 5
- mods = ["thestro","wi3n"]
- # 8
- specialusers = ["thestro"]
- # 9
- cowner = ["thestro","YvJ","0rX","Xpe"]
- staffa = [""]
- wordtodaytime = ["thestro","ramy","yvj"]
- ##Setting Pretty Colors
- #Font setting for your bot
- class TestBot(ch.RoomManager):
- def onInit(self):
- self.setNameColor("F9F")
- self.setFontColor("F33")
- self.setFontFace("1")
- self.setFontSize(13)
- self.enableBg()
- self.enableRecording()
- global answer
- global lockdown
- ##Connecting Crap
- #This is what will be printed on your python console when event called
- def onConnect(self, room):
- print("Connected.")
- if 0 == 1:
- room.message("Tranquilaa e aici. Rulez fara probleme.")
- def onReconnect(self, room):
- print("Reconnected")
- def onDisconnect(self, room):
- print("Disconnected")
- ##### Time####
- def getUptime():
- # do return startTime if you just want the process start time
- return time.time() - startTime
- def uptime():
- total_seconds = float(getUptime())
- # Helper vars:
- MINUTE = 60
- HOUR = MINUTE * 60
- DAY = HOUR * 24
- # Get the days, hours, etc:
- days = int( total_seconds / DAY )
- hours = int( ( total_seconds % DAY ) / HOUR )
- minutes = int( ( total_seconds % HOUR ) / MINUTE )
- seconds = int( total_seconds % MINUTE )
- ##Ignore this, you dont need to worry about this
- #Well, you can actually take a little time to look at it and learn something
- def onMessage(self, room, user, message):
- #### Comenzi fără prefix
- if message.body.startswith("test"):
- room.message("Testare efectuată cu succes!")
- if message.body.startswith("Tranquilaa"):
- if user.name == "thestro":
- room.message("Yea, Lord TheStro !?")
- else:
- room.message("What's up,"+ user.name+"?")
- if message.body.startswith("sall"):
- if user.name == "thestro":
- room.message("Salut Lord "+ user.name+".")
- else:
- room.message("Salut,"+ user.name+".")
- if message.body.startswith("brb"):
- if user.name == "thestro":
- room.message("Bye, Lord TheStro.")
- else:
- room.message("Bye,"+ user.name+".")
- if message.body.startswith("back"):
- if user.name == "thestro":
- room.message("Welcome back,Lord TheStro.")
- else:
- room.message("Welcome back,"+ user.name+".")
- try:
- startlag = time.clock()
- if room.getLevel(self.user) > 0:
- print(user.name, message.body)
- else:
- print(user.name, message.body)
- if self.user == user: return
- if message.body[0] == "~" or message.body[0] == "/" or message.body[0] == ">" or message.body[0] == "#" or message.body[0] == "^" or message.body[0] == "^" or message.body[0] == "*": ##Here is the Prefix part
- data = message.body[1:].split(" ", 1)
- if len(data) > 1:
- cmd, args = data[0], data[1]
- else:
- cmd, args = data[0], ""
- if cmd == "ev" or cmd == "eval" or cmd == "e":
- ret = eval(args)
- if ret == None:
- room.message("Terminat.")
- return
- room.message(str(ret))
- ##guess number
- if cmd == "guessnum" or cmd == "gn" or cmd == "Gn" or cmd == "Guessnum":
- if args == "nou":
- numbergame()
- room.message("Jocul reincepe... ;) Un alt număr a fost generat! Acum incercati să-l ghiciti..(E.x. ~gn 27)")
- return
- if(args==answer):
- room.message("DING DING DIIING ^_^ "+sntonick(user.name)+" , got it right with the number : "+args)
- elif(args!=answer and answer > args ):
- room.message("Mai mare! <3")
- elif(args!=answer and answer < args ):
- room.message("Mai mic! <3")
- #### Is Down
- if cmd=="isdown":
- if len(args)>0:
- for line in urlreq.urlopen("http://www.downforeveryoneorjustme.com/"+args):
- decoder=line.decode("UTF-8")
- if "It's just you." in decoder:
- room.message(args+" Should be up....")
- break
- if "It's not just you!" in decoder:
- room.message(args+" Looks down for now.")
- break
- if "doesn't look like a site on the interwho." in decoder:
- room.message(args+" isn't a valid url.")
- break
- else:
- continue
- # Ban List
- if cmd == "banlist":
- room.message("The banlist is: "+str(room.banlist))
- ##ForceSave
- if cmd == "save":
- time.sleep(1)
- print("[SAVE] SAVING DEFINITIONS...")
- f = open("definitions.txt", "w")
- for word in dictionary:
- definition, name = json.loads(dictionary[word])
- f.write(json.dumps([word, definition, name])+"\n")
- if user.name.lower() in owners or user.name in cowner:
- room.message("Se salveaza...(Force Mode!)...")
- else:
- room.message("Se salveaza...(Normal Mode!)")
- f.close()
- ###### Define
- if cmd == "def" or cmd == "define" or cmd == "Define" or cmd == "Def" and len(args) > 0:
- try:
- try:
- word, definition = args.split(":", 1)
- word = word.lower()
- except:
- word = args.split()[0].lower()
- definition = ""
- if len(word.split()) > 1:
- room.message("Nu am reusit sa definesc...Scuze. :(")
- return
- if len(args.split()) > 1 and args.lower().split()[1] == "del" :
- if word in dictionary:
- definition, name = json.loads(dictionary[word])
- if name == user.name or user.name in owners or user.name in admin or user.name in vip or user.name in tempvip:
- del dictionary[word]
- room.message("Definitie stearsa din database.")
- return
- else:
- room.message("Nu ai permisiunea sa folosesti asta.")
- return
- else:
- room.message("<b>%s</b> nu este inca definit. Poti sa il definesti chiar acum scriind urmatoarele : <b> /def %s: (definitie)*</b>" % args, True)
- elif len(definition) > 0:
- if word in dictionary:
- room.message(" Este deja definit. :)")
- else:
- dictionary[word] = json.dumps([definition, user.name])
- room.message(word + " a fost definit astfel:" + definition)
- else:
- if word in dictionary:
- definition, name = json.loads(dictionary[word])
- room.message(word + " a fost definit astfel: " + definition)
- else:
- room.message("<b>%s</b> nu este inca definit. Poti sa il definesti chiar acum scriind urmatoarele: <b> /def %s: definitie*</b> " % (args, args), True)
- except:
- room.message("Oh , nu! Ai gresit. Incearca din nou.")
- #### Lag
- if cmd == "lag" or cmd == "Lag":
- lag = time.clock() - startlag
- lag1 = time.time() - message.time
- str(time.clock() - startlag)
- room.message("<b>Lag Time:</b> "+str(lag1)+"",True)
- ### Send Notes
- if cmd == "sn" or cmd == "sendnote" or cmd == "Sn" or cmd == "Sendnote":
- try:
- to, body = args.split(" ", 1)
- sender = user.name
- if to in owners:
- sasaran[to] = json.dumps([body, sender])
- room.message("Trimis!")
- notif.append(to)
- else: room.message(to+" nu se află in whitelist.")
- #if user.name : room.message( kamu dapat sn dari .... silahkan gunakan cmd 'sn read ) kek gitu aja
- except: room.message("Fail !!")
- #### ReadNotes
- if cmd == "readnote" or cmd == "Readnote":
- try:
- if user.name in sasaran:
- body, sender = json.loads(sasaran[user.name])
- room.message(user.name+", ai o notită nouă de la "+sender+" ---> "+body)
- del sasaran[user.name]
- notif.remove(to)
- except: return
- #### WordToday
- if cmd =="wordtoday" or cmd=="wt":
- if user.name in owners:
- if user.name in wordtodaytime:
- w = json.loads(wordtodaytime[user.name])
- if time.time() < w:
- w = int(w) - int(time.time())
- minute = 60
- hour = minute * 60
- day = hour * 24
- days = int(w / day)
- hours = int((w % day) / hour)
- minutes = int((w % hour) / minute)
- seconds = int(w % minute)
- string = ""
- if days > 0:
- string += str(days) + " " + (days == 1 and "day" or "days" ) + ", "
- if len(string) > 0 or hours > 0:
- string += str(hours) + " " + (hours == 1 and "hour" or "hours" ) + ", "
- if len(string) > 0 or minutes > 0:
- string += str(minutes) + " " + (minutes == 1 and "minute" or "minutes" ) + ", "
- string += str(seconds) + " " + (seconds == 1 and "second" or "seconds" )
- room.message("You can use wordtoday after <font color='#9999FF'>%s</font> (~^o^)~ "% string,True)
- return
- if urank(user.name) >= 1:
- x=(random.choice(["sadness","happines","yaoi","yuri","horny","nice","bad","bastard","young","lazy","poor","rich","ugly","handshome","beautiful","good","gay","keep calm","arrogant","naughty","special","sweet","tits","areola","pupy","ass","sunny","dizzy","nude","old","lifeless","dying",'death',"impotent","cancer"]))
- room.message("Dear "+sntonick(user.name)+" Your word today is : <b><font color='#FF9966'>"+str(x)+"</font></b>",True)
- wordtodaytime[user.name] = json.dumps(time.time()+1200)
- #### Staff
- if cmd =="staff" or cmd =="ss" or cmd =="ranker":
- x = ", ".join(cowner)
- y = ", ".join(staffa)
- o = len(staffa)
- room.message("Owners : "+str(x).title()+" <br>Staff("+str(o)+"): "+str(y).title()+"",True)
- #### CurrentStats
- if cmd == "cs" or cmd =="currentstats":
- a = len(self.roomnames)
- b = len(whitelist)
- c = len(owners)
- d = len(whitelist)
- e = len(nicks)
- f = len(friend)
- g = len(blacklist)
- room.message("<br><br>Rooms: "+str(a)+" <br>Whitelist: "+str(b)+" <br>Player: "+str(c)+" <br>Definitions: "+str(d)+" <br>Nick: "+str(e)+" <br>Staffbot: "+str(f)+" <br>Cash: "+str(g)+"",True)
- #### Random Number
- if cmd == "RandomNumber" or cmd == "randomnumber" or cmd == "rn" or cmd == "Rn":
- room.message(random.choice(["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99","100"]))
- #### Eval
- if cmd == "ev" or cmd == "eval" or cmd == "e" and user.name in owners:
- lag = time.clock() - startlag
- str(time.clock() - startlag)
- ret = eval(args)
- if ret == None:
- room.message("Done")
- return
- room.message("ANSWER : "+str(ret)+"",True)
- #### All cmds for members
- if cmd == "cmds" or cmd == "Cmds" or cmd == "CMDS":
- room.message("Nu este disponibil acum.")
- #### List Of Cmds For Staff
- if cmd =="scmds" or cmd == "acmds":
- room.message("List cmd for staff : ")
- #### Music Top (Neterminat)
- if cmd == "scres" or cmd == "Scres":
- room.message(random.choice(["WIZ KHALIFA FEAT. CHARLIE PUTH - SEE YOU AGAIN: https://youtu.be/RgKAFK5djSk","NICKY JAM FEAT. ENRIQUE IGLESIAS - EL PERDON: https://youtu.be/hXI8RQYC36Q","SMILEY - OARECARE: https://youtu.be/gnwlRoFoLXs","NAGUELE FEAT. ANDRA - FALAVA: https://youtu.be/073TNjLc070","DISCLOSURE - HELP ME LOSE MY MIND: https://youtu.be/1MqYtAvtv48","MAJOR LAZER FEAT.MO,DJ SNAKE - LEAN ON: https://youtu.be/YqeW9_5kURI","LOST FREQUENCIES - ARE YOU WITH ME: https://youtu.be/VjHMDlAPMUw","DAN BITTMAN - SI INGERII AU DEMONII LOR: https://youtu.be/xia2Gs6MqmM","THE WEEKND - EARNED IT_FIFTY SHADES OF GREY: https://youtu.be/waU75jdUnYw","DJ SNAKE FEAT. LIL JON - TURN DOWN FOR WHAT: https://youtu.be/HMUDVMiITOU","CARLA'S DREAMS FEAT. DELIAT MATACHE - CUM NE NOI: https://youtu.be/D8-g8CpXdO8","PETER POP FEAT. LORA - SINGURI IN DOI: https://youtu.be/pqb4I7ODTZ8","CONNECT - R FEAT. SHIFT - BAGA MARE: https://youtu.be/2SN9Z3kAc6s","","TOP15","TOP16","TOP17","TOP18","TOP19","TOP20","TOP21","TOP22","TOP23","TOP24","TOP25","TOP26","TOP27","TOP28","TOP29","TOP30","TOP31","TOP32","TOP33","TOP34","TOP35","TOP36","TOP37","TOP38","TOP39","TOP40"]))
- #### Doresc femeie
- if cmd == "doresc" and args.startswith("femeie") or cmd == "vreau" and args.startswith("femeie"):
- room.message(random.choice(["http://linzhouweb.com/wp-content/uploads/2015/457095-anime-girl-with-pink-hair-and-headphones.jpg","https://s-media-cache-ak0.pinimg.com/736x/0d/26/0c/0d260c39d75852e64c8ed594deb03600.jpg","http://i59.tinypic.com/t8nl07.jpg","http://i1166.photobucket.com/albums/q608/Starling4anime/54351432.jpg","https://s-media-cache-ak0.pinimg.com/736x/a9/76/fc/a976fc85bfc50f238cb41e59fe2032ea.jpg","http://images4.fanpop.com/image/photos/16400000/Anime-Girls-daina-the-hedgehog-16438588-1024-768.jpg","http://www.mrwallpaper.com/wallpapers/anime-girl-flowers-field-1920x1440.jpg","http://onlyfreewallpaper.com/walls/blue-assassin-girl-wide.jpg","http://www.wallsave.com/wallpapers/1024x768/ninja-blade/518537/ninja-blade-girl-518537.jpg","https://secure.static.tumblr.com/b541803191caf08f1a8790fa44842ce3/fcbjrfp/39en2dnw4/tumblr_static_anime-girl-with-headphones-anime-hd-wallpaper-1920x1080-4277.jpg","http://animewall.net/wp-content/uploads/2015/02/anime_girl_wallpaper_download_for_pc_background.jpeg","http://www.textnovel.com/cover_images/16172/lonely-anime-girl.jpg","http://fc08.deviantart.net/fs71/f/2013/076/b/d/anime_girl_wallpaper_1366x768_by_raykorn-d5ybgz6.png","http://p1.pichost.me/i/73/1983654.jpg","http://images6.fanpop.com/image/photos/32900000/Anime-Girls-anime-32978170-960-540.jpg","http://fc01.deviantart.net/fs71/f/2013/242/9/e/anime_girls_i_have_the_hot_for_by_yukkithesweet-d6kafml.jpg","http://th08.deviantart.net/fs71/PRE/f/2012/154/4/d/anime_girl_by_arkkukakku112-d525zuc.png","https://myneverlanddotcom.files.wordpress.com/2012/02/anime-girls-anime-10342106-1024-7681.jpg","http://nd06.jxs.cz/265/646/9666c423c0_100376483_o2.jpg","http://www.hdwallpapersos.com/wp-content/uploads/2014/11/cute-wallpapers-anime-cute-wallpaper-girl-picture-hair-silver-cartoon-girls-wallpaper-39902.jpg","http://freedwallpaper.com/wp-content/uploads/2014/12/Best-top-desktop-anime-girls-wallpapers-hd-anime-girl-wallpaper-picture-image-19.jpg","http://www.angelxp.eu/galaxys4/Couleur/Manga01.jpg","http://www.wallpaperhi.com/thumbnails/detail/20130809/fairy%20tail%20anime%20anime%20girls%20swords_www.wallpaperhi.com_24.jpg","https://kazasou.files.wordpress.com/2013/04/konachan-com-122492-game_cg-green_eyes-kikouyoku_senki_ii_gin_no_toki_no_corona-moon-red_hair-short_hair-sword-weapon.jpg","http://www.gamersbin.com/attachments/f188/19376-sexy-hd-anime-wallpapers-hotsexyanimegirls8.jpg","http://i.imgur.com/WgDfW.jpg","http://cdn.playbuzz.com/cdn/d717ed0f-a98e-4bd4-8930-f53735a68b15/58c45676-c51d-40e7-8639-f6a24f9d6c4e.jpg","https://s-media-cache-ak0.pinimg.com/originals/eb/15/d1/eb15d17503b7685f1ad4e539914b2a8e.jpg","http://kaminosaber.com/wp-content/uploads/2014/07/super-cute-anime-girls-10.jpg","http://onlyfreewallpaper.com/download/purple-anime-girl-1920x1080.jpg","http://images5.fanpop.com/image/photos/24800000/Anime-Girl-anime-female-characters-24849504-1280-960.jpg","http://3.bp.blogspot.com/_TYuhq0x56sk/Sjm5ycnyzCI/AAAAAAAAARk/XZbBdM1DADs/s1600/14-782314.jpeg","http://img.powerhomepages.com/images/anime/anime_girls_on_a_beach.jpg","http://25.media.tumblr.com/5a7d26fd60d8e85a6122a7aa50ea10bd/tumblr_mu8u7ro47n1rdp5h1o1_500.jpg"]))
- #### Spin
- if cmd == "spin" or cmd == "Spin" or cmd == "invarte" or cmd == "Invarte":
- room.message(user.name.capitalize()+" invarte sticla. S-a oprit in dreptul lui "+random.choice(room.usernames)+". ^^")
- #### Dice
- if cmd == "zar" or cmd == "Zar" or cmd == "Dice" or cmd == "dice":
- dice1=random.randint(1,6)
- dice2=random.randint(1,6)
- room.message(user.name+",ai aruncat zarul si ai obtinut asta. : "+str(dice1)+" , "+str(dice2))
- #### Game Adv ori Prov.
- if cmd == "Adv sau Prov" or cmd == "adv sau prov":
- room.message("Hmmm.. Ador jocul!>.< Adevar sau Provocare?")
- if cmd == "adevar" or cmd == "Adevar" or cmd == "Adevăr" or cmd == "Adv." or cmd == "adv." or cmd == "adv" or cmd == "Adv":
- room.message(random.choice(["If you could trade lives with another person you know for one week who would it be?",
- "When where you embarrassed getting caught in the middle of something?",
- "Who in this chat room would be the worst to be trapped in an elevator with?",
- "What is the longest you have gone without taking a bath or shower?",
- "What is more important than money?",
- "If you will be given a chance to become invisible for one day, what would do with this ability?",
- "Describe the strangest dream you have ever had in your life?",
- "What's your wildest fantasy?"
- "If you were to choose people from here for a threesome, who would it be?"]))
- if cmd == "provocare" or cmd == "Provocare" or cmd == "prov" or cmd == "Prov" or cmd == "prov." or cmd == "Prov.":
- room.message(random.choice(["Become the slave of another user of your choosing for 10 minutes.",
- "Poke someone you do not know on facebook. Show Proof.",
- "Record a video of you singing any popular song that you know all the words to and post it to youtube.",
- "For the rest of the day/night begin everything you say with 'All hail Queen Nefertari.'",
- "Paste the lyrics of a stupid song.",
- "Masturbate right now no matter where you are or who is around.",
- "Suck your thumb and cry like a baby.",
- "Say the words âin bedâ after everything you say for the next 5 min.",
- "Open an art program and attempt to draw a self portrait. Show proof.",
- "Tell us your best joke."]))
- #### Quotes
- if cmd == "citat" or cmd == "Citat":
- room.message(random.choice(["Power isn't determined by your size, but by the size of your heart and dreams.",
- "If you donât risk your life, you canât create a future. Right?",
- "You can't bring back what you've lost, think about what you have now.",
- "No one is born into this world to be alone.",
- "To true friendship, how long you've known each other means nothing.",
- "You want weapons? Weâre in a library! Books! The best weapons in the world!",
- "Bow ties are cool.",
- "Dividing an impossibly large task into smaller solvable problems is a programmerâs job.",
- "Math is a language.",
- "Hold hands. That's what you're meant to do. Keep doing that... and don't let go.",
- "Be yourself; everyone else is already taken.",
- "Don't worry if plan A fails, there are 25 more letters in the alphabet.",
- "Life doesn't have any hands, but it can sure give you a slap sometimes.",
- "Hope. Hope is the only thing stronger than fear.",
- "It's the things we love the most,that destroy us",
- "Pain has deep roots. The only way to dig it out is to forgive...",
- "Love,after all,always said more about those who felt it then it did about the ones they love.",
- "Memories are funny things.Sometimes they're real ,but other times they change into what we went them to be.",
- "The moment of impact. The moment of impact proves potential for change. Has ripples effects far beyond what we can predict. Sending some particles crashing together. Making them closer than before. While sending others spinning off into great ventures. Landing them where you've never thought you've found them. That's the thing about moments like these. You can't, no matter how hard you try, controlling how it's gonna affect you. You just gotta let the colliding part goes where they may. And wait. For the next collision."]))
- #### Da sau Nu .. Random Replic Romana
- if cmd == "Svc" or cmd == "svc":
- room.message(random.choice(["Da","Nu"]))
- #### Funny
- if cmd == "funny" or cmd == "Funny":
- room.message(random.choice(["http://static.boredpanda.com/blog/wp-content/uploads/2015/03/ninja-cats-2-21__605.jpg",
- "http://uberhumor.com/wp-content/uploads/2015/03/e5yforz.jpg",
- "https://scontent-fra.xx.fbcdn.net/hphotos-xpf1/v/t1.0-9/11079607_647625022035198_3078461837081461130_n.jpg?oh=d489c2fd0cc7580f45a088ee8fbdd3d5&oe=55B1060A",
- "http://uberhumor.com/wp-content/uploads/2015/03/TGup7sQ.jpg",
- "http://i.imgur.com/YppDSSe.jpg",
- "https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xpt1/v/t34.0-12/s180x540/11091326_843639572362839_869018710_n.jpg?oh=ddfa0f5292332d165f1583a173079b79&oe=5519D867&__gda__=1427700135_823f6b008bf498273bf5a0b99da9c280",
- "https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xfa1/v/t34.0-12/11081586_843639632362833_924691807_n.jpg?oh=cc7703a81f54e39b2109b5be97f9132b&oe=5518D221&__gda__=1427688861_9c6a8873cedda4b93706a2a2e1193e3f",
- "https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xpf1/v/t34.0-12/s180x540/11063308_741675625946541_106159036_n.jpg?oh=696ea267c3ebd11d84279ebbee9565c4&oe=5519FF37&__gda__=1427777352_118ca3c5a006267ff06e518cc80c1eb0",
- "http://img-9gag-ftw.9cache.com/photo/a1e7Arw_460svwm.webm"]))
- #### Cats
- if cmd == "cats" or cmd == "Cats":
- room.message(random.choice(["http://lovemeow.com/wp-content/uploads/2013/05/tumblr_mkzzqswXis1r4u63lo2_1280.jpg",
- "http://www.pageresource.com/wallpapers/wallpaper/wild-cats-apple-mac-comic-pet-very-happy-cat_467784.jpg",
- "http://www.catster.com/files/post_images/bf9f08a3412a7e3dd2f09f2ea869042e.jpg",
- "http://www.3d-hdwallpaper.com//bulk_images/cat-dog-wallpaper-dowload.jpg",
- "http://cdn3.vox-cdn.com/imported_assets/2236821/happy-cat.jpg",
- "http://www.alegoo.com/images05/animals/cats-1/024/happy-cat-07.png",
- "http://api.ning.com/files/3vKQkh-Flonsns93BprBPAweXlSnkss65lYwcOZYJiOUYtyTgpue3zOeIA*dmaQcWW0VUAWQKC2sM3IYVCRI0Uda6WgucP8T/happycatt.jpg",
- "http://img5.visualizeus.com/thumbs/0a/07/cat,animals,cats,content,cute,happy-0a07e7e1d3e776f1d63e4aef49b29212_h.jpg",
- "https://s-media-cache-ak0.pinimg.com/236x/c7/8a/8f/c78a8fa4a4bf6337ae3e076deb4e83b8.jpg",
- "https://www.pixoto.com/images-photography/animals---cats/portraits/happy-cat-paws-65225632.jpg",
- "https://stephaniepomfrett.files.wordpress.com/2013/01/happy-cat.jpg"]))
- #### Jokes
- if cmd == "jokes" or cmd == "Jokes":
- room.message(random.choice(["The teacher asked Jimmy, 'Why is your cat at school today Jimmy?' Jimmy replied crying, 'Because I heard my daddy tell my mommy, 'I am going to eat that pussy once Jimmy leaves for school today!'",
- "A child asked his father, 'How were people born?' So his father said, 'Adam and Eve made babies, then their babies became adults and made babies, and so on.' The child then went to his mother, asked her the same question and she told him, 'We were monkeys then we evolved to become like we are now.' The child ran back to his father and said, 'You lied to me!' His father replied, 'No, your mom was talking about her side of the family.'",
- "Do not be racist; be like Mario. He's an Italian plumber, who was made by the Japanese, speaks English, looks like a Mexican, jumps like a black man, and grabs coins like a Jew!",
- "Roses are red. Your blood is too. You look like a monkey. And belong in a zoo. Do not worry, I'll be there too. Not in the cage, But laughing at you.",
- "A blonde, a redhead, and a brunette were all lost in the desert. They found a lamp and rubbed it. A genie popped out and granted them each one wish. The redhead wished to be back home. Poof! She was back home. The brunette wished to be at home with her family. Poof! She was back home with her family. The blonde said, 'Awwww, I wish my friends were here.'"]))
- #### Response
- if cmd == "response" or cmd == "Response" or cmd == "Rsp":
- room.message(random.choice(["Yes.","Indeed.","No.","No way.","Not in a million years","Possibly.","Not sure","Hell yes.","Hell no.","I'm afraid you're right.","I'm afraid you're wrong.","Not sure what to say.","Repeat the question , please.","Definetely.","Definetely not.","Of course.","Oh my master , no."]))
- #### Parkour
- if cmd == "parkour" or cmd == "Parkour" or cmd == "Prk":
- room.message(random.choice(["http://canal3.md/media/2015/05/parkour.jpg","http://grapeshotmq.com.au/wp-content/uploads/2015/03/Parkour-Luxembourg4.jpg","http://www.circephoto.com/data/photos/372_1parkour_7.jpg","http://www.flowacademy.co.nz/wp-content/uploads/2014/03/sfondo-parkour-1280x800.jpg","http://www.isfsports.org/wp-content/uploads/2015/05/pb-120912-palestinian-parkour-jsa-2photoblog900-2190054.jpeg","http://www.aljazeera.com/mritems/images/2014/3/2/201432125141986945_8.jpg","http://msnbcmedia.msn.com/j/MSNBC/Components/Photo/_new/pb-120912-palestinian-parkour-jsa-1.photoblog900.jpg","http://guildlocal.com/wp-content/uploads/2013/02/Parkour-Crop.jpg","http://upload.wikimedia.org/wikipedia/commons/c/c2/Team_JiYo_-_pioneerne_indenfor_parkour_i_danmark.jpg","http://i.ytimg.com/vi/Qc03qBkh2Do/maxresdefault.jpg","http://www.adamdunlap.com/blog/wp-content/uploads/2014/02/parkour_olympics_david_belle_adam_dunlap.jpg"]))
- #########################################################################################################################################################################
- #### Slap
- elif cmd == "slap" or cmd == "Slap":
- if not args == "":
- if args in owners:
- room.message("No I'm not going to slap my owner! No way!")
- else:
- room.message("*Slaps "+args+" till death* :@")
- else:
- room.message(user.name.capitalize()+", WTF am I supposed to slap! O.o")
- #### Shoot
- elif cmd == "shoot" or cmd == "Shoot":
- if not args == "":
- if args in owners:
- room.message("Owner shot! Acum cine va fi ownerul meu?")
- else:
- room.message("*Shots "+args+" pana cand vine politia * :@")
- else:
- room.message(user.name.capitalize()+", WTF Chiar trebuie să fac asta? O.o")
- #### Kick
- elif cmd == "kick" or cmd == "Kick":
- if not args == "":
- if args in owners:
- room.message("Owner a fugit prea repede! Nu am putut să-l dau afară.")
- else:
- room.message("*Kicks "+args+" 's balls pana "+args+" plange* :@")
- else:
- room.message(user.name.capitalize()+", Pe cine trebuie să dau afară? :|")
- #### Cookie
- elif cmd =="cookie" or cmd == "Cookie":
- room.message(random.choice(["Oh Yeah! Cookie! :3 " , "Suure. ^^" , "O_O Gimme dat right meow." , "Cookie?...YESH" , "Cookie Monster!" , "*noms the cookie* ~thaanks~",]))
- #### Give ME
- elif cmd == "giveme" or cmd == "Giveme" or cmd == "GiveMe":
- room.message("Aici esti tu! *gives "+user.name.capitalize()+" "+args+"*")
- #### Gender
- elif cmd =="gender" or cmd == "Gen" or cmd == "Gender" or cmd == "gen":
- room.message("Deci, esti curios... In fine... Sunt fată. Asta a fost dorinta Lordului Meu <3.")
- #### Announcements
- elif cmd == "Anunt" or cmd == "anunt":
- if user.name.lower() in owners:
- for room in self.rooms:
- room.message("[ANUNT]: Anunt foarte important de la "+user.name.title()+" : "+args)
- room.message("http://i.imgur.com/jE6Jkok.png")
- else:
- room.message("Nu ai permisiunea de a efectua asta. ")
- #### Events
- elif cmd == "event" or cmd == "Event":
- if user.name.lower() in owners:
- for room in self.rooms:
- room.message("[Event]: Se anunta un eveniment : "+args)
- room.message("http://i.imgur.com/jE6Jkok.png")
- else:
- room.message("Nu ai permisiunea de a efectua asta. ")
- #### Reverse
- elif cmd == "reverse" or cmd == "Reverse":
- rev = str(args[::-1])
- room.message(rev)
- #### Profile picture
- elif cmd == "pfpic" or cmd == "PfPic":
- link = "http://fp.chatango.com/profileimg/%s/%s/%s/full.jpg" % (args[0], args[1], args)
- room.message(link)
- #### Info / Help
- elif cmd == "info" or cmd == "Info":
- room.message("Numele meu este Tranquilaa. Am fost creata de Lordul TheStro pentru a distra useri ca tine. :)")
- elif cmd == "help" or cmd == "Help":
- room.message("Pentru a afla ce pot face eu, scrie >~Cmds<. ;)")
- #### Restart
- elif cmd =="restart" or cmd == "Restart" or cmd == "Reconnect" or cmd == "reconnect":
- if user.name.lower() in owners:
- room.reconnect()
- else:
- room.message("Ce ??? *lol*")
- #### Leave
- elif cmd == "Leave" or cmd == "leave" and user.name in owners:
- if user.name in owners:
- room.message("Shutting down ...")
- self.setTimeout(4, self.stop, )
- self.stop()
- else:
- room.message("Ce ??? *lol*")
- #### Join
- elif cmd == "join" or cmd == "Join":
- if user.name in owners:
- room.message("*Am fost conectată pe un alt chat, numit <b>%s</b>*" % args, True)
- self.joinRoom(args)
- else:
- room.message("Sunt deja acolo :|")
- #### Spam
- elif cmd == "spam" or cmd == "Spam":
- room.message("Uite aici niste spam pentru tine, "+user.name.capitalize()+". ;)")
- room.message("http://i.imgur.com/6eJQw.gif")
- #### Recognize
- elif cmd == "rec" or cmd == "Recognize" or cmd == "Rec" or cmd == "recognize":
- if args == "25194 commands":
- room.message("Access granted.")
- file13 = open("cmds.txt", "r")
- room.message(file13.read())
- file13.close()
- elif args == "25194":
- room.message("Acces granted.")
- room.message("Hi there , "+user.name.capitalize()+". :3")
- else:
- room.message("Access denied.")
- #### Scuze
- elif cmd == "scuze" or cmd == "scz" or cmd == "Scuze" or cmd == "Scz":
- room.message("Iti accept scuzele si te voi tine minte. :)")
- file = open("sorry.txt", "a")
- file.write(" "+user.name.capitalize()+". ,")
- file.close()
- #### Invite
- elif cmd == "invite" or cmd == "Invite":
- if len (args) > 0:
- self.pm.message(ch.RoomManager(args),"%s vrea sa i te alaturi intr-un chatroom! http://%s.chatango.com ." %(owners[0],room.name))
- room.message("Am invitat pe %s in acest grup. :)" % args)
- else:
- room.message("Spune-mi pe cine sa invit.")
- ###################################################################### Comenzi Setate ##########################################################################################
- ##Say
- #Make your bot say what you want
- if cmd == "say" or cmd == "Say" or cmd == "Spune" or cmd == "spune":
- room.message(args)
- ##Random User
- #What's this for ? this one cmd will make your boy say the name of a random user in a room
- if cmd == "randomuser" or cmd == "RandomUser" or cmd == "ru" or cmd == "Ru":
- room.message(random.choice(room.usernames))
- ##Check Level
- #This one cmd is tho make your bot say your mod level in the current room you're in
- elif cmd == "mylvl" or cmd == "MyLvl" or cmd == "MyLevel" or cmd == "mylevel":
- room.message("Your mod level: %i" %(room.getLevel(user)))
- ##DANCE!!!!
- #Dance Of Course !!! ^_^
- elif cmd == "dance" or cmd == "Dance":
- for i, msg in enumerate(dancemoves):
- self.setTimeout(i / 2, room.message, msg)
- ##Check if Mod
- #not really important
- elif cmd == "ismod" or cmd == "IsMod" or cmd == "Ismod":
- if args:
- if room.getLevel(ch.User(args)) > 0:
- room.message(args + " is a Mod")
- else:
- room.message(args + " is not a Mod")
- if args == "":
- if room.getLevel(user.name) > 0:
- room.message(user.name + " is a Mod")
- else:
- room.message(user.name + " is not a Mod")
- ##### Active/Deactive ####
- ### Sleep
- if cmd == "sleep" or cmd == "Sleep":
- if user.name in owners: return
- room.message("Tranquilaa's este in Sleep mode")
- lockdown = True
- ### Wake
- if cmd == "wake" or cmd == "Wake":
- if user.name in owners: return
- room.message("Tranquilaa's este in Wake mode")
- lockdown = False
- ### Lock/Unlock
- if cmd == "lock" or cmd == "Lock":
- if user.name in owners:
- room.message("LOCKED!")
- lock = True
- return
- if args in locks:
- room.message("It's locked already")
- return
- if args in self.roomnames:
- if user.name in owners:
- locks.append(args)
- room.message("locked <b>%s</b>" % args, True)
- else: room.message("Only rank 3 gets to lock rooms remotely")
- if args == "":
- if room.name in locks:
- room.message("It's locked already")
- return
- locks.append(room.name)
- room.message("locked <b>%s</b>" % room.name, True)
- if args not in self.roomnames:
- if args == "": return
- room.message("I haven't joined such room")
- return
- if cmd == "unlock" or cmd == "UnLock" or cmd == "Unlock":
- if user.name in owners: return
- if args in self.roomnames:
- if args in locks:
- if user.name in owners:
- locks.remove(args)
- room.message("unlocked <b>%s</b>" % args, True)
- else: room.message("Only rank 3 gets to unlock rooms remotely")
- else:
- room.message("It's not even locked")
- return
- if args == "":
- if room.name in locks:
- locks.remove(room.name)
- room.message("unlocked <b>%s</b>" % room.name, True)
- else:
- room.message("It's not even locked")
- return
- if args not in self.roomnames:
- if args == "": return
- room.message("I'm not in that room")
- return
- ##---------------------------------FUTURE---------------------------------##
- ###### Call the bot
- if "tranquilaa" == message.body.lower() or "kurotsuno" == message.body.lower() or "kuro" == message.body.lower():
- if user.name == "thestro":
- room.message("yes, Lord Prosciutto?")
- else:
- room.message("What's up "+sntonick(user.name)+" ?", True)
- if "hi" == message.body.lower():
- room.message("Hi~ ! :)")
- if "<><" == message.body.lower():
- room.message("Pfft, that's a gay fish !")
- if message.body.lower().startswith("afk"):
- if user.name in "thestro":
- room.message("See you Lord Creator!")
- else:
- room.message("See you soon "+sntonick(user.name)+"!", True)
- if "brb" in message.body.lower():
- if user.name == "thestro":
- room.message("See you soon Lord Creator!")
- else:
- room.message("See you soon "+sntonick(user.name)+" !", True)
- if "back" == message.body.lower():
- if user.name == "thestro":
- room.message("Wellcome back Lord Creator!")
- else:
- room.message("Wellcome back "+sntonick(user.name)+" !", True)
- if "pagi" == message.body.lower():
- room.message("Selamat pagi~ ! :)")
- if "morning" == message.body.lower():
- if user.name == "thestro":
- room.message("Good Morning Lord Creator !")
- else:
- room.message("Good Morning %s !" % sntonick(user.name), True)
- ##### End Call The Bot#####
- ### MultiChat
- elif cmd == "multichat" or cmd == "mc" or cmd == "MultiChat" or cmd == "Mc":
- if args == "":
- x = 'My Default room : www.desenecalumea.chatango.com'
- room.message(x,True)
- else:
- b = 'Done ! , This is your Room : <a href="http://ch.besaba.com/chat/flash/?'+args+'" target="_blank"><u><font color="#999999">Click Here!!</u></a> '
- room.message(b,True)
- elif cmd == "multichat2" or cmd == "mc2":
- if args == "":
- x = 'My Default room : <a href="http://ch.besaba.com/chat/html5/?newdenscund!,monosekai!,obsoletedream!" target="_blank"><u>Click Here!!</u></a> '
- room.message(x,True)
- else:
- b = 'Done ! , This is your Room : <a href="http://ch.besaba.com/chat/html6/?'+args+'" target="_blank"><u><font color="#999999">Click Here!!</u></a> '
- room.message(b,True)
- ##### Set Background
- if cmd== "sbg" or cmd == "Sbg" or cmd == "Set Background":
- if user.name in owners:
- if len(args) > 0:
- if args == "On":
- room.setBgMode(1)
- room.message("Background On")
- return
- if args == "Off":
- room.setBgMode(0)
- room.message("Background Off")
- ###### Fax
- if cmd == "fax" or cmd == "Fax":
- try:
- name, body = args.split(" ", 1)
- l = "http://ch.besaba.com/mty.htm?"+room.name+"!"
- if name in self.roomnames :
- self.getRoom(name).message('[<font color="#6699CC"><b>Message</b></font> - %s ] in <a href=\"%s" target=\"_blank\"><u>%s</u></a> : <font color="#66FFFF"><i> %s <i></font>' % (sntonick(user.name), l, room.name, body),True)
- room.message("Sent")
- else:
- room.message("I haven't joined that room")
- except:room.message("error")
- #### Profile
- elif cmd == "prof" or cmd == "profile" or cmd == "Prof" or cmd == "Profile":
- try:
- args=args.lower()
- stuff=str(urlreq.urlopen("http://"+args+".chatango.com").read().decode("utf-8"))
- crap, age = stuff.split('<span class="profile_text"><strong>Age:</strong></span></td><td><span class="profile_text">', 1)
- age, crap = age.split('<br /></span>', 1)
- crap, gender = stuff.split('<span class="profile_text"><strong>Gender:</strong></span></td><td><span class="profile_text">', 1)
- gender, crap = gender.split(' <br /></span>', 1)
- if gender == 'M':
- gender = 'Male'
- elif gender == 'F':
- gender = 'Female'
- else:
- gender = '?'
- crap, location = stuff.split('<span class="profile_text"><strong>Location:</strong></span></td><td><span class="profile_text">', 1)
- location, crap = location.split(' <br /></span>', 1)
- crap,mini=stuff.split("<span class=\"profile_text\"><!-- google_ad_section_start -->",1)
- mini,crap=mini.split("<!-- google_ad_section_end --></span>",1)
- mini=mini.replace("<img","<!")
- picture = '<a href="http://fp.chatango.com/profileimg/' + args[0] + '/' + args[1] + '/' + args + '/full.jpg" style="z-index:59" target="_blank">http://fp.chatango.com/profileimg/' + args[0] + '/' + args[1] + '/' + args + '/full.jpg</a>'
- prodata = '<br/> <a href="http://chatango.com/fullpix?' + args + '" target="_blank">' + picture + '<br/><br/> Age: '+ age + ' <br/> Gender: ' + gender + ' <br/> Location: ' + location + '' '<br/> <a href="http://' + args + '.chatango.com" target="_blank"><u>Chat With User</u></a> ' "<br/><br/> "+ mini
- room.message(prodata,True)
- except:
- room.message(""+args+" doesn't exist o.o ")
- #### Bg
- if cmd =="bg":
- try:
- args=args.lower()
- picture = '<a href="http://st.chatango.com/profileimg/' + args[0] + '/' + args[1] + '/' + args + '/msgbg.jpg" style="z-index:59" target="_blank">http://fp.chatango.com/profileimg/' + args[0] + '/' + args[1] + '/' + args + '/msgbg.jpg</a>'
- prodata = '<br/>'+picture
- room.message(prodata,True)
- except:
- room.message(""+args+" doesn't exist o.o ")
- #### Pm
- elif cmd == "pm" or cmd == "Pm" or cmd == "PM" or cmd == "Private Message":
- data = args.split(" ", 1)
- if len(data) > 1:
- name , args = data[0], data[1]
- self.pm.message(ch.User(name), "[Private.Message] By - "+user.name+" : "+args+" ")
- room.message("Trimis la "+name+"")
- #### MyIp
- elif cmd =="myip" or cmd == "MyIp" or cmd == "MyIP" or cmd == "My IP Adress":
- try:
- room.message("Your I.P. address is : "+message.ip)
- except:
- room.message("IP lookup failed , bot is not a mod in this chat.")
- #### Rooms
- elif cmd == "rooms" or cmd == "Rooms":
- j = []
- for i in self.roomnames:
- j.append(i+'[%s]' % str(self.getRoom(i).usercount))
- j.sort()
- room.message("I'm Playing In "+'[%s] rooms: '%(len(self.roomnames))+", ".join(j))
- #### User Count
- elif cmd == "count" or cmd == "Count":
- room.message("I see: <font color='#9999FF'><b>"+str(room.usercount)+"</b></font>",True)
- ### User List
- elif cmd == "userlist" or cmd == "UserList" or cmd == "User List" or cmd == "User list":
- if args == "":
- usrs = []
- gay = []
- finale = []
- prop = 0
- prop = prop + len(room._userlist) - 1
- for i in room._userlist:
- i = str(i)
- usrs.append(i)
- while prop >= 0:
- j = usrs[prop].replace("<User: ", "")
- i = j.replace(">", "")
- gay.append(i)
- prop = prop - 1
- for i in gay:
- if i not in finale:
- finale.append(i)
- if len(finale) > 40:
- room.message("<font color='#9999FF'><b>40</b></font> of <b>%s</b> users in this room: %s"% (len(finale), ", ".join(finale[:41])), True)
- if len(finale) <=40 :
- room.message("Current <b>%s</b> users of this room: %s"% (len(finale),", ".join(finale)), True)
- if args != "":
- if args not in self.roomnames:
- room.message("I'm not there.")
- return
- users = getParticipant(str(args))
- if len(users) > 40:
- room.message("<font color='#9999FF'><b>40</b></font> of <b>%s</b> current users in <b>%s</b>: %s"% (len(users), args.title(), ", ".join(users[:41])), True)
- if len(users) <=40:
- room.message("Current <b>%s</b> users in <b>%s</b>: %s"% (len(users), args.title(), ", ".join(users)), True)
- #### Mods
- elif cmd == "mods" or cmd == "Mods":
- args = args.lower()
- if not args:
- room.message("<br/><font color='#9999FF'><b>Owner</b></font>: <u><b>"+(room.ownername)+"</b></u> <br/><font color='#9999FF'><b>Mods</b></font>: "+", ".join(room.modnames), True)
- return
- if args in self.roomnames:
- moda = self.getRoom(args).modname
- own = self.getRoom(args).ownername
- room.message("<br/><font color='#9999FF'><b>Owner</b></font>: <b><u>"+(own)+"</u></b> <br/><font color='#9999FF'><b>Mods</b></font>: "+", ".join(moda), True)
- else:
- self.joinRoom(args)
- cek_mods[user.name] = json.dumps([room.name,args])
- #### Google Image Search
- elif cmd == "gis" or cmd == "Gis" or cmd == "Google Search Image" or cmd == "GS Image":
- try:
- search = args.split()
- import urllib.request
- with urllib.request.urlopen("http://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=%s" % "+".join(search)) as url:
- udict = url.read().decode()
- a = re.finditer('"unescapedUrl":"(.+?)","url":"', udict)
- matches = []
- for match in a:
- match = str(match.group(1))
- matches.append(match)
- link = random.choice(matches)
- try:
- link = link.replace("https", "http")
- except:
- print("Random choice isn't SSL.")
- if args: room.message("%s, I found: %s" % (sntonick(user.name), link), True)
- except:
- room.message("%s I'm sorry, I was unable to find anything for search term: %s :|" % (str(user.name), args), True)
- #### Ban / Unban
- elif cmd == "ban" or cmd == "Ban" or cmd == "Interzicere" or cmd == "interzicere":
- if user.name in owners:
- name = args
- if user.name in owners:
- room.message("Njet >_>")
- return
- if name in room.usernames:
- room.banUser(ch.User(name))
- room.message("<b>%s</b> is banned" % (name), True)
- self.pm.message(ch.User(name.lower()), "You have been banned from %s by %s. Please behave lik a Punk!!" % (room.name, user.name))
- else:
- room.message("i don't see "+name+" here :|")
- else:
- room.message("You mere mortals can never do that !!")
- elif cmd == "unban" or cmd == "ub" or cmd == "UnBan" or cmd == "Unban" or cmd == "Scoate Interzicerea" or cmd == "Scoate interzicerea":
- if user.name in owners:
- name = args
- if user.name in owners: return
- room.unban(ch.User(name))
- room.message("<b>%s</b> is unbanned" % (name), True)
- self.pm.message(ch.User(name.lower()), "You have been unbanned from %s by %s. Please behave lik a Punk!!" % (room.name, user.name))
- else:
- room.message("You mere mortals can never do that !!")
- #### Broadcast
- if cmd == "broadcast" or cmd == "Broadcast" or cmd == "Shout" or cmd == "shout" or cmd == "Bc" or cmd == "Bc":
- if user.name in owners: #Only rank 4+ can Broadcast a Message
- for room in self.rooms:
- if args == "": return
- else:
- room.message("Broadcast de la - "+user.name + ": "+args, True)
- else:
- room.message("[<b>%s</b>] Only Admins Members are allowed" % "ERROR", True)
- #### Send
- if cmd == "send" or cmd == "Send" or cmd == "Senddd" or cmd == "Sendddd":
- try:
- if user.name in ownres:
- name, body = args.split(" ", 1)
- if user.name in owners:
- if name in self.roomnames:
- self.getRoom(name).message("Message from <b>%s</b> - %s" % (user.name, body), True)
- room.message("[<b>%s</b>] Message Sent" % "INF", True)
- else:
- room.message("[<b>%s</b>] I haven't joined that room :|" % ("ERROR"), True)
- else:
- room.message("You mere mortals can never do that !!")
- self.setTimeout(int(3), room.message, "*Aims Colt. Python Revolver at <b>%s</b> and shot him dead*" % user.name, True)
- except:
- room.message("Fail !!!")
- #### Sayb
- elif cmd == "sayb" or cmd == "SayB" or cmd == "Sayb":
- if args:
- room.message(args[-5])
- else:
- room.message(":| *Speechless*")
- #### Nicks
- elif cmd == "nick" or cmd == "Nick":
- try:
- if args:
- nicks[user.name]=json.dumps(args)
- room.message (user.name+" will now be called "+args ,True)
- saveNicks()
- if args == "":
- room.message("type 'nick (your-new-nickname-here)")
- except:
- room.message("Failed to create a nickname for "+user.name+".")
- ### My Nick
- elif cmd == "mynick" or cmd == "Mynick" or cmd == "MyNick":
- try:
- if user.name in nicks:
- room.message("Your current nick is "+sntonick(user.name)+" :3", True)
- else:
- room.message("You haven't told me your nick, do 'nick new-nick-here to make your nick")
- except:
- return
- ## See Nick
- elif cmd == "seenick" or cmd == "Seenick" or cmd == "SeeNick":
- try:
- if args in nicks:
- room.message(args+"'s nickname is "+sntonick(args)+" X3", True)
- else:
- room.message(args+" haven't told me his nick :|")
- except:
- return
- #### Credits
- elif cmd == "credits" or cmd == "Credits" or cmd == "Creators":
- room.message('<font color="#FFCC00">%s</font>Credits: ||<font color="#DC1620"><b>%s</b></font>[<font color="#ff0000"><b>%s</b></font>] ||<font color="#f033FF">%s</font>[Coding Tutors] ||<font color="#00CC00">%s</font>[Fellow Bot Maker] ||<font color="#CC00FF">%s</font>[Trusted Test Subjects]' % ("||", "0rX, xMotrhA", "OWNER", "Poeticartist1, TryHardHusky(Horny Dog)", "Agunq", "Hellbobrok Conferrence"), True)
- #### Seen
- elif cmd == "seen" or cmd == "Seen":
- try:
- nama = args
- if nama in hist:
- waktu, ruang, body = json.loads(hist[nama])
- room.message("Last message i seen by "+nama+" - "+waktu+" - "+ruang+" - "+body)
- else:
- room.message("I haven't seen " + nama + " all this days :|")
- except:
- room.message("fail")
- #### Find
- elif cmd == "find" or cmd == "Find":
- name = args.split()[0].lower()
- try:
- if name in room.usernames:
- if not ch.User(name).roomnames: room.message("dont see them. <_<")
- else: room.message("%s is curently in <b>%s</b> >_>" % (args, ", ".join(ch.User(name).roomnames)), True)
- except: return
- target = args[1:]
- if args[0] == "+":
- if not ch.User(target).roomnames: room.message("dont see them. <_<")
- else: room.message("%s is curently in <b>%s</b> >_>" % (args[1:], ", ".join(ch.User(target).roomnames)), True)
- elif args == "true love" or args == "True Love" or args == "True love":
- orang = random.choice(room.usernames)
- room.message(random.choice([user.name+", You just found out that "+orang+" is your true love :o","I'm sorry "+user.name+" You didn't found your true love here :(",user.name+"'s true love is "+orang+", Have fun you godamn lovebirds !! ^^","Njet >_> ,, No love for you !","Shut up >_> ,, I love you since we first met !"]))
- #### LoveMeter
- elif cmd == "lovemeter" or cmd == "lm" or cmd == "LoveMeter" or cmd == "Love Meter" or cmd == "Lovem":
- try:
- user2, user3 = args.split(" and ", 1)
- moter = random.randint(6,100)
- try:
- user1 = args.lower()
- if user1 in lomet:
- meter = json.loads(lomet[user1])
- meter = str(meter)
- room.message("I Gaze upon the stars... *Closes my eyes and concentrates*. And again, <b>%s</b> and <b>%s</b>, their love meter is <b>%s</b>%s ,, that is the answer of fate ;)" % (user2, user3, str(meter), "%"), True)
- else:
- moter = str(moter)
- lomet[user1] = json.dumps(moter)
- room.message("I Gaze upon the stars... *Closes my eyes and concentrates*. Gotcha, <b>%s</b> and <b>%s</b>, their love meter is <b>%s</b>%s ,, that is the answer of fate ;)" % (user2, user3, moter, "%"), True)
- except:
- room.message("Fail !!")
- except:
- room.message("Fail !! You must do as the fate desires !")
- #### Tea
- elif cmd == "tea" or cmd == "Tea":
- if not args == "":
- if args in owners:
- room.message("*Pour heavenly tea to my master's cup*")
- if args == "bot":
- room.message("*Sips my tea*")
- else:
- room.message("*Pour tea to "+sntonick(args)+"'s cup*", True)
- else:
- if user.name in owners:
- room.message("*Pour heavenly tea to my master's cup*")
- else:
- room.message("*Pour tea to "+sntonick(user.name)+"'s cup*", True)
- #### Hug
- elif cmd == "hug" or cmd == "Hug":
- if args:
- room.message("*"+user.name+" hugged "+args+"*")
- else:
- room.message("Hugs "+(user.name)+".", True)
- #### Kiss
- elif cmd == "kiss" or cmd == "Kiss":
- if args:
- if args == "" or args == "bot": return
- room.message(random.choice([user.name+" Kisses "+args+" so Passionately and lovingly :3",args+" is being kissed by "+user.name+" and "+args+" loves it so much .__.",user.name+" deep kissed "+args, user.name+" kisses "+args+" wildly and they ended up playing in the bushes O_o"]))
- if args == "" or args.lower() == "messedhat" or args.capitalize() == "messh" or args.capitalize() == "messedhat":
- if user.name in spermitted or user.name in permitted:
- room.message(random.choice(["*Kisses "+user.name+"-sama*","Yaay, xD *Kisses "+user.name+"* >///<","*Makes out with "+user.name+"-sama*"]))
- else:
- room.message(random.choice(["*Kisses "+user.name+"*","*Kisses* :x","*refused to give "+user.name+" a kiss*"]))
- #### Google Search
- elif cmd == "gws" or cmd == "Gws" or cmd == "Google Search":
- if len(args) > 0:
- room.rawMessage("<a href='http://lmgtfy.com/?q=" + args + "' target='_blank'><u>" + args + '</u></a>' )
- #### Jones >.<
- elif cmd == "jones" or cmd == "Jones":
- if len(args)>0:
- obv = ["what do you want ?","what do you want?","what do you want","what do you desire ?","what do you desire","what do you desire?","what do you wish for?","what do you wish for ?","what do you wish for"]
- insult = ["fuck you","fook you","damn you","i hate you","kiss my ass"]
- jelas = ["apa maumu ?","apa maumu?","Apa maumu","apa maumu","mau lo apa ?","mau lo apa?","mau lo apa","lu mau apa?","lu mau apa ?","lu mau apa"]
- if args in obv:
- room.message(random.choice(["I want a girlfriend :)","I want you >:)","I need a whore","I want a lover","Your Anus !!","Your tits !","I want your soul >:3","Gimme a gun","Your money :|","Give me your money !!!"]))
- if args in jelas:
- room.message(random.choice(["Tidakkah jelas ? gue mau jablay !","Gue butuh cewek broh","hadehh dia pake nanya,, gue mau cewek"]))
- if args in insult:
- room.message(random.choice(["Well, Fuck you too","oh shit whatever >_>","Stfu and kiss my arse !!"]))
- else:
- if args in obv or args in insult or args in jelas: return
- room.message(random.choice(["yes","no","maybe","not likely","I'm too depressed right now ,try asking again later","It's a secret ;)","Still, i'm not.","True","Better not tell you now.","It is certain.","Certainly :)","I'm not sure >_>","Yes, I'am"]))
- else:
- room.message("This is The Mighty Jones command. You must ask a question for The Mighty Jones to answer...(EXAMPLE: 'jones Am I doing this right o.O ???)")
- #### Bored
- elif cmd == "bored" or cmd == "Bored":
- room.message(random.choice([user.name+", check the newest manga on http://mangareader.net ","You need to read some hentai "+user.name,"Nih buat "+user.name+", http://fakku.net","Just fap "+user.name+" !!",user.name+", Try chatting in http://ch.pew.im/chat/?animeindotv!,ecchi-us!,monosekai!,tango-hyoo!,i3ryok!","Say that again and i'll kill you "+user.name,"Try again "+user.name+" !!","Watch this Video "+user.name+" - http://www.youtube.com/watch?v=LWi8tNVotAY",user.name+", Play some Death Metal song and do some headbangs",user.name+", Play Jenga !!"]))
- #### Sex and Rape
- elif cmd == "sex" or cmd == "rape" or cmd == "Rape" or cmd == "Sex":
- if room.name == "animeindotv" or room.name == "ecchi-us":
- room.message("I Prohibit that command here")
- else:
- if args == "@random":
- args = (random.choice(room.usernames))
- room.message(random.choice([user.name+" had a passionate sex with "+args,user.name+" raped "+args+" and got labeled as a lolicon",user.name+" raped "+args+" in public and got arrested *lol*",user.name+" fucked "+args+"'s nipple and "+user.name+" got a Nipplefuck Addiction :o",user.name+" Had sex with "+args+" and got labeled as a Gay",user.name+" fucks "+args+"'s ass real hard and cums inside",user.name+" had sex with "+args+" and came really hard",user.name+" fooked "+args+"'s pussy and didn't cum",user.name+" fucked "+args+"'s mouth so hard and lost his penis :|"]))
- else:
- if args == "": return
- room.message(random.choice([user.name+" had a passionate sex with "+args,user.name+" raped "+args+" and got labeled as a lolicon",user.name+" raped "+args+" in public and got arrested *lol*",user.name+" fucked "+args+"'s nipple and "+user.name+" got a Nipplefuck Addiction :o",user.name+" Had sex with "+args+" and got labeled as a Gay",user.name+" fucks "+args+"'s ass real hard and cums inside",user.name+" had sex with "+args+" and came really hard",user.name+" fooked "+args+"'s pussy and didn't cum",user.name+" fucked "+args+"'s mouth so hard and lost his penis :|"]))
- #### Ud
- elif cmd == "ud" or cmd == "Urban Dictionary" or cmd == "Urban D" and len(args) > 0:
- try:
- term = args.replace(" ", "+")
- term2 = args
- import urllib.request
- with urllib.request.urlopen("http://www.urbandictionary.com/define.php?term=%s" % term[0:]) as url:
- udict = url.read().decode()
- a = re.finditer('<div class="definition">(.+?)</div>', udict)
- matches = []
- for match in a:
- matches.append(match.group(0))
- room.message("<br><b>defintion of %s:</b><br><br><i>%s</i></font>" % (term2, random.choice(matches)), True)
- except Exception as e:
- room.message("I was unable to find anything for <b>%s</b>" % term2, True)
- ###Youtube
- if cmd == "video" or cmd == "Video" or cmd == "Yt" or cmd == "Ytb" or cmd == "Youtube" or cmd == "yt" or cmd == "ytb" or cmd == "youtube":
- room.message(youtube.search(args), True)
- except Exception as e:
- try:
- et, ev, tb = sys.exc_info()
- lineno = tb.tb_lineno
- fn = tb.tb_frame.f_code.co_filename
- room.message("[Expectation Failed] %s Line %i - %s"% (fn, lineno, str(e)))
- return
- except:
- room.message("Undescribeable error detected !!")
- return
- #### Buna
- ##### Ends the Commands #####
- ##Other Crap here, Dont worry about it
- def onFloodWarning(self, room):
- room.reconnect()
- def onJoin(self, room, user):
- print(user.name + " joined the chat!")
- if user.name in owners:
- room.message("Hello ,"+user.name.capitalize()+"! :D")
- def onLeave(self, room, user):
- print(user.name + " left the chat!")
- def onUserCountChange(self, room):
- print("users: " + str(room.usercount))
- def onMessageDelete(self, room, user, msg):
- print("MESSAGE DELETED: " + user.name + ": " + msg.body)
- if __name__ == "__main__": TestBot.easy_start()
- #The End!!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement