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 lastWarningTimestamp = null; | |
var delayInterval = 15; // The interval in seconds | |
var languageViolationLedger = {}; | |
var checkLastWarning = function(msg) { | |
console.log("lastWarningTimestamp: " + lastWarningTimestamp + ", Date.now() " + Date.now() / 1000); | |
if (Date.now() / 1000 - lastWarningTimestamp > delayInterval) { | |
CometdRoom.sendMessage(msg); | |
lastWarningTimestamp = Date.now() / 1000; |
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); |
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) |
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) |
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) |
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
CC=g++ | |
CFLAGS=-g -Wall -std=c++11 -I/usr/local/include -I/Users/jbarnett/cinder/include | |
LIBPATH += -L"/System/Library/Frameworks/CoreLocation.framework/Resources" | |
LIBPATH += -L"/System/Library/Frameworks/Accelerate.framework/Resources" | |
LIBPATH += -L"/System/Library/Frameworks/ApplicationServices.framework/Resources" | |
LIBPATH += -L"/System/Library/Frameworks/QuickTime.framework/Resources" | |
LIBPATH += -L"/System/Library/Frameworks/Carbon.framework/Resources" | |
LIBPATH += -L"/System/Library/Frameworks/Cocoa.framework/Resources" | |
LIBPATH += -L"/System/Library/Frameworks/OpenGL.framework/Libraries" |