Advertisement
Buzzrz

Notalk.lua

Jan 11th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. local function run(msg, matches)
  2. if is_owner(msg) then
  3. return
  4. end
  5. if matches[1] == 'chat_add_user' or matches[1] == 'chat_add_user_link' then
  6. return
  7. end
  8. local data = load_data(_config.moderation.data)
  9. if data[tostring(msg.to.id)] then
  10. if data[tostring(msg.to.id)]['settings'] then
  11. if data[tostring(msg.to.id)]['settings']['lock_arabic'] then
  12. lock_adds = data[tostring(msg.to.id)]['settings']['lock_arabic']
  13. end
  14. end
  15. end
  16. local chat = get_receiver(msg)
  17. local user = "user#id"..msg.from.id
  18. if lock_adds == "yes" then
  19. send_large_msg(chat, 'ممنوع')
  20. chat_del_user(chat, user, ok_cb, true)
  21. end
  22. end
  23.  
  24. return {
  25. patterns = {
  26. "^!!tgservice (chat_add_user_link)$",
  27. "^!!tgservice (chat_add_user)$",
  28. ".*"
  29. },
  30. run = run
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement