Advertisement
az4521

Untitled

Jun 12th, 2016
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. //HIDE THE ANNOYING BOTS
  2. var to_hide = [
  3. "dj_lost",
  4. "grimes4life",
  5. "PotatoFlute",
  6. "PlayEmLive",
  7. "IHeart80s",
  8. "HeroPup",
  9. "PieNudesBot",
  10. "sudobot",
  11. "az_bot"
  12. ];
  13. for (var i = 0; i < to_hide.length; i++) {
  14. $(".userlist_item_" + to_hide[i]).remove();
  15. }
  16. $api.on("user_join", function(e, data) {
  17. if (to_hide.indexOf(data.name) !== -1) {
  18. e.cancel();
  19. }
  20. });
  21.  
  22.  
  23. //remove bots from count
  24. function updateUserCount() {
  25. setTimeout(function() {
  26. var total_users = $(".userlist_item").length;
  27. $("#usercount").text(total_users + " connected users");
  28. }, 2000);
  29. }
  30. $api.on("user_join", updateUserCount);
  31. $api.on("user_leave", updateUserCount);
  32. $api.on("loaded", updateUserCount);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement