Last active
February 17, 2020 14:21
-
-
Save jamesbarnett/ddc89c5d0763721a43d5a680a37805da to your computer and use it in GitHub Desktop.
Kicks all people that are not NCs friend
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 friendsOnly = function(x) { | |
if (!FriendsController.isFriends(x.data.userUuid)) { | |
CometdModerator.kickAccount(x.data.userUuid); | |
CometdModerator.removeAccountMessages(x.data.userUuid); | |
} | |
}; | |
var friendsOnlyListener = $.cometd.addListener('/chatroom/user/joined/*', friendsOnly); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment