Created
February 21, 2013 10:30
-
-
Save brumm/5003776 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function bankicker() { | |
var all_users = User.all(); | |
// the first character of a username is being replaced | |
// but not used/written back to the dom?? | |
// var chat = $('.uc'); | |
// chat.each(function() { | |
// var user = $(this).find('.cun').text(); | |
// user = user.replace(/[^a-zA-Z]/g, ''); | |
// }); | |
for (var i = 0; i < all_users.length; i++) { | |
if (all_users[i]['nick'] && all_users[i]['nick'].match(/[unnamed]/g)) { | |
var banID = all_users[i]['id']; | |
socket.send_cmd("takeleader", User.me.id); | |
socket.send_cmd("ban", banID); | |
} | |
} | |
// Why? | |
// setTimeout(bankicker, 1); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment