Created
February 17, 2020 11:14
-
-
Save jamesbarnett/bc02545001a11350aa31260e0be4b88a to your computer and use it in GitHub Desktop.
Friends Only Shields
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
var friends_only = function(x) { | |
var friends = x.data.friends; | |
var userUuid = x.data.userUuid; | |
if (FriendsController.isFriends(userUuid)) {} else { | |
CometdModerator.banAccount(userUuid); | |
setTimeout(function(x){CometdModerator.unbanAccount((userUuid))}, 10000); | |
}; | |
}; | |
$.cometd.addListener('/chatroom/user/joined/*', friends_only) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment