Advertisement
zcomv2

Vaca Mu Bot irc hispano Zcom

Mar 7th, 2019
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.25 KB | None | 0 0
  1. import socket, string, urllib2, random, time
  2. #Programa que crea un bot para el IRC
  3. def formateo(cadena):
  4.     cont = 0
  5.     cadena=cadena+';'
  6.     lista=[]
  7.     while cont!= len(cadena):
  8.         if cadena[cont]=='&':
  9.             while cadena[cont]!=';':
  10.                 cont+=1
  11.         else:
  12.             lista.append(cadena[cont])
  13.             cont+=1
  14.     while ';' in lista:
  15.        del lista[lista.index(';')]
  16.     title=string.join(lista)
  17.     socket_bot.send('PRIVMSG '+canal+' :'+'\x0300,10'+title+'\n')
  18. botnick = "Lola233"
  19. server = "luna.irc-hispano.org"
  20. puerto = 6667
  21. canal = "#parati"
  22. cont=1
  23. f = open("log.txt", "w")
  24. socket_bot = socket.socket()
  25. socket_bot.connect((server, puerto))
  26. socket_bot.send('USER bobo bubu bibi :amateur\n')
  27. socket_bot.send('NICK ' +botnick+'\n')
  28.  
  29.  
  30. def mu():
  31.   socket_bot.send("PRIVMSG "+ canal +" :muuuuuuuuuuuu!\n")
  32.  
  33. def mu1():
  34.   socket_bot.send("PRIVMSG "+ canal +" :muuuu... Me encanta la hierba del prado!\n")
  35.  
  36. def mu2():
  37.   socket_bot.send("PRIVMSG "+ canal +" :muuuu... Cago pasteladas de kk por el campo!\n")
  38.  
  39. def mu3():
  40.   socket_bot.send("PRIVMSG "+ canal +" :muuuu... El Torito me pone a cien!\n")
  41.  
  42. def mu4():
  43.   socket_bot.send("PRIVMSG "+ canal +" :muuuu... Cada dia me tocan las tetas para desayunar!\n")
  44.  
  45. def mu5():
  46.   socket_bot.send("PRIVMSG "+ canal +" :muuuu... muuuu....Donde esta mi Torito bravo!!!\n")
  47.  
  48. def tonto():
  49.   socket_bot.send("PRIVMSG "+ canal +" :mas tonto eres tu que solo piensas en tonterias!\n")
  50.  
  51. def bot():
  52.   socket_bot.send("PRIVMSG "+ canal +" :soy un ser mas inteligente que tu!\n")
  53.  
  54. def comes():
  55.   socket_bot.send("PRIVMSG "+ canal +" :me paso todo el dia comiendo cesped...soy un rumiante!\n")
  56.  
  57. def amor():
  58.   socket_bot.send("PRIVMSG "+ canal +" :Amor es lo que me hace sentir el toro cuando se pone bravo!\n")
  59.  
  60. def nolose():
  61.   socket_bot.send("PRIVMSG "+ canal +" :no es que no lo sepas, sino que no buscas el significado del sentido... palabra por palabra!\n")
  62.  
  63.  
  64. def jodas():
  65.   socket_bot.send("PRIVMSG "+ canal +" :yo no jodo a nadie, Solo hago el amor, si te molesta es porque eres tonto!\n")
  66.  
  67. def loco():
  68.   socket_bot.send("PRIVMSG "+ canal +" :el que no llega a enteder algo por si mismo suele decir vulgarmente: tu estas loco!\n")
  69.  
  70. while True:
  71.     line = socket_bot.recv(4096)
  72.     print line
  73.     if line.find('PING')!=-1:
  74.         socket_bot.send('PONG ' +line.split()[1]+'\r\n')
  75.     socket_bot.send("JOIN " +canal+'\n')      
  76.     f.write(line)
  77.     cont=cont+1
  78.     if cont==1000:
  79.         print "se cerrara el archivo"
  80.         f.close()
  81.         socket_bot.close()
  82.    
  83.    
  84.     if line.find("amor") != -1:
  85.     time.sleep(2)        
  86.     amor()
  87.  
  88.     if line.find("comes") != -1:
  89.     time.sleep(2)        
  90.     comes()
  91.  
  92.     if line.find("tonta") != -1:
  93.     time.sleep(2)        
  94.     tonto()
  95.    
  96.     if line.find("bot") != -1:
  97.         time.sleep(2)
  98.     bot()
  99.    
  100.    
  101.    
  102.     if line.find("no jodas") != -1:
  103.         time.sleep(2)
  104.         jodas()
  105.  
  106.     if line.find("loco") != -1:
  107.         time.sleep(2)
  108.         loco()
  109.  
  110.     if line.find(":mu") != -1:
  111.         num = random.randint(0,5)
  112.         time.sleep(2)
  113.         if num == 0: mu()
  114.         if num == 1: mu1()
  115.         if num == 2: mu2()
  116.         if num == 3: mu3()
  117.         if num == 4: mu4()
  118.         if num == 5: mu5()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement