Advertisement
Buzzrz

Antilink with lock | unlock

Dec 31st, 2015
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. local function run(msg, matches)
  2. if is_owner(msg) then
  3. return
  4. end
  5. local data = load_data(_config.moderation.data)
  6. if data[tostring(msg.to.id)] then
  7. if data[tostring(msg.to.id)]['settings'] then
  8. if data[tostring(msg.to.id)]['settings']['lock_adds'] then
  9. lock_adds = data[tostring(msg.to.id)]['settings']['lock_adds']
  10. end
  11. end
  12. end
  13. local chat = get_receiver(msg)
  14. local user = "user#id"..msg.from.id
  15. if lock_adds == "yes" then
  16. send_large_msg(chat, 'ممنوع الاعلانات!')
  17. chat_del_user(chat, user, ok_cb, true)
  18. end
  19. end
  20.  
  21. return {
  22. patterns = {
  23. "telegram.me/joinchat/",
  24. "https://"
  25. },
  26. run = run
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement