Advertisement
EditorRUS

Untitled

Oct 27th, 2013
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. load_ywhitelist()
  2. if (!fexists(WHITELIST_FILE)) //Doesn't it exists?
  3. text2file(null, WHITELIST_FILE) //CREATE IT
  4. y_whitelist = file2list(WHITELIST_FILE)
  5.  
  6. isInWhitelist(var/K)
  7. K = ckey(K)
  8. if (K in y_whitelist)
  9. return 1
  10. return 0
  11.  
  12. addInWhitelist(var/K as text)
  13. K = ckey(K)
  14. if (isInWhitelist(K))
  15. return 0
  16. text2file(K, WHITELIST_FILE)
  17. y_whitelist += K
  18. return 1
  19.  
  20. removeFromWhitelist(var/K as text)
  21. K = ckey(K)
  22. if (K in y_whitelist)
  23. y_whitelist -= K
  24. fdel(WHITELIST_FILE)
  25. text2file(dd_list2text(y_whitelist, "\n"), WHITELIST_FILE) //Goddamn BYOND.
  26. return 1
  27. return 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement