Advertisement
Guest User

Untitled

a guest
Oct 18th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 4.29 KB | None | 0 0
  1. wait3 = {
  2.     "copy":False,
  3.     "copy2":"target",
  4.     "target":{}
  5. }
  6.  
  7.  
  8.  
  9. #-------------------COPY---------------#
  10.             elif msg.text in ["Mimic on","mimic on"]:
  11.                 if msg.from_ in admin:
  12.                         wait3["copy"] = True
  13.                         cl.sendText(msg.to,"Mimic on")
  14.                 else:
  15.                     cl.sendText(msg.to,"You are not a admins")
  16.             elif msg.text in ["Mimic off","mimic off"]:
  17.                 if msg.from_ in admin:
  18.                         wait3["copy"] = False
  19.                         cl.sendText(msg.to,"Mimic off")
  20.                 else:
  21.                     cl.sendText(msg.to,"You are not a admins")
  22.             elif msg.from_ in admin and wait3["copy"] == True and wait3["copy2"] == "me" and "Ccopy" not in msg.text:
  23.                 for i in range(1):
  24.                     cl.sendText(msg.to,msg.text)
  25.                     wait3["copy"] = False
  26.                 wait3["copy"] = True
  27.             elif msg.from_ in wait3["target"] and wait3["copy"] == True and wait3["copy2"] == "target":
  28.                 for i in range(1):
  29.                     cl.sendText(msg.to,msg.text)
  30.                     wait3["copy"] = False
  31.                 wait3["copy"] = True
  32.             elif "Mimic " in msg.text:
  33.                 if msg.from_ in admin:
  34.                     if wait3["copy"] == True:
  35.                         siapa = msg.text.replace("Mimic ","")
  36.                         if siapa.rstrip(' ') == "me":
  37.                             wait3["copy2"] = "me"
  38.                             cl.sendText(msg.to,"Mimic change to me")
  39.                         elif siapa.rstrip(' ') == "target":
  40.                             wait3["copy2"] = "target"
  41.                             cl.sendText(msg.to,"Mimic change to target")
  42.                         else:
  43.                             cl.sendText(msg.to,"I dont know")
  44.                     else:
  45.                         cl.sendText(msg.to,"Sorry, before using.. change Mimic to on")
  46.                 else:
  47.                     cl.sendText(msg.to,"You are not a admins")
  48.             elif "Target @" in msg.text:
  49.                 if msg.from_ in admin:
  50.                     target = msg.text.replace("Target @","")
  51.                     gc = cl.getGroup(msg.to)
  52.                     targets = []
  53.                     for member in gc.members:
  54.                         if member.displayName == target.rstrip(' '):
  55.                             targets.append(member.mid)
  56.                     if targets == []:
  57.                         cl.sendText(msg.to, "User not found")
  58.                     else:
  59.                         for t in targets:
  60.                             wait3["target"][t] = True
  61.                         cl.sendText(msg.to,"Target added")
  62.                 else:
  63.                     cl.sendText(msg.to,"You are not a admins")
  64.             elif "Del target @" in msg.text:
  65.                 if msg.from_ in admin:
  66.                     target = msg.text.replace("Del target @","")
  67.                     gc = cl.getGroup(msg.to)
  68.                     targets = []
  69.                     for member in gc.members:
  70.                         if member.displayName == target.rstrip(' '):
  71.                             targets.append(member.mid)
  72.                     if targets == []:
  73.                         cl.sendText(msg.to, "User not found")
  74.                     else:
  75.                         for t in targets:
  76.                             del wait3["target"][t]
  77.                         cl.sendText(msg.to,"Target deleted")
  78.                 else:
  79.                     cl.sendText(msg.to,"You are not a admins")
  80.             elif msg.text in ["Targetlist"]:
  81.                 if msg.from_ in admin:
  82.                         if wait3["target"] == {}:
  83.                             cl.sendText(msg.to,"nothing")
  84.                             ki.sendText(msg.to,"nothing")
  85.                             kk.sendText(msg.to,"nothing")
  86.                             kc.sendText(msg.to,"nothing")
  87.                         else:
  88.                             mc = "Target copy user\n"
  89.                             for mi_d in wait3["target"]:
  90.                                 mc += "* "+cl.getContact(mi_d).displayName + "\n"
  91.                             cl.sendText(msg.to,mc)
  92.                 else:
  93.                     cl.sendText(msg.to,"You are not a admins")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement