Advertisement
Guest User

lo que llevo xd

a guest
Sep 6th, 2016
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. ### msg de quien entro al chat
  2.  
  3. def onJoin(self, room, user):
  4. print(user.name + " joined the chat!")
  5.  
  6. ### msg de quien sale del chat
  7.  
  8. def onLeave(self, room, user):
  9. print(user.name + " left the chat!")
  10.  
  11. ### count user
  12.  
  13. def onUserCountChange(self, room):
  14. print("users: " + str(room.usercount))
  15.  
  16. ### contestar MPs
  17.  
  18. def onPMMessage(self, pm, user, body):
  19. pm.message(user, "Bot Traps. Talk to %s or goto http://openingsyendings.chatango.com/ for more info" % owners[0])
  20.  
  21. def onPMOfflineMessage(self, pm, user, body):
  22. pm.message(user, "Bot Traps. Talk to %s or goto http://openingsyendings.chatango.com/ for more info" % owners[0])
  23.  
  24. ### conectar a una room
  25.  
  26. rooms = ["animeflvme", "openingsyendings"]
  27. username = "cuenta"
  28. password = "password"
  29.  
  30. bot.easy_start(rooms,username,password)
  31.  
  32. ### hablar con x letra y color
  33.  
  34. def onInit(self):
  35. self.setNameColor("000000")
  36. self.setFontColor("000000")
  37. self.setFontFace("Comic")
  38. self.setFontSize(14)
  39.  
  40. ### cmd por defaul
  41.  
  42. if cmd[0] == ".":
  43. prfx = True
  44. cmd = cmd[1:]
  45. else:
  46. prfx = False
  47.  
  48. ### say
  49.  
  50. if cmd.lower() == "say" and prfx:
  51. room.message(args)
  52.  
  53. ### auto conect chat
  54.  
  55. elif prefix and cmd == "join" or cmd == "goto":
  56. if user.name in owners:
  57. self.joinRoom(args)
  58. room.message("Successfull nii-chan Go to http://%s.chatango.com " % args)
  59. else:
  60. room.message("U're not my nii-chan ")
  61.  
  62. ### leave chat
  63.  
  64. if prefix and cmd == "leave":
  65. if user.name in owners:
  66. if "here" in args:
  67. args = room.name
  68. self.leaveRoom(args)
  69. room.message("Successfull nii-chan ")
  70. else:
  71. room.message("You're not my nii-chan ")
  72.  
  73. ### datos etc
  74.  
  75. botname = "botname"
  76. botpassword = "botpassword"
  77. botsys = "cellinux_shell-OS"
  78. botversion = 1.02
  79. botrelease = "Alpha"
  80.  
  81. ###
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement