Permalink
Browse files

rage faces and the 7 grant updates

  • Loading branch information...
1 parent 695d324 commit 78c530e8d105567252f879c0ddb21cda0fb48040 @zackster committed Apr 15, 2012
Showing with 941 additions and 47 deletions.
  1. +49 −2 TODO
  2. +36 −26 app.js
  3. +5 −0 rooms/models.js
  4. +2 −1 static-config.js
  5. +68 −3 static/chat.js
  6. +2 −7 static/comm.js
  7. +652 −0 static/css/rage.css
  8. BIN static/img/001.jpg
  9. BIN static/img/002.jpg
  10. BIN static/img/12.jpg
  11. BIN static/img/447.jpg
  12. BIN static/img/461.jpg
  13. BIN static/img/4rest_by_UncleCameleon.jpg
  14. BIN static/img/51200203.jpg
  15. BIN static/img/Afternoon1_01.jpg
  16. BIN static/img/Atomicsunset.jpg
  17. BIN static/img/DarkblissWraith.jpg
  18. BIN static/img/Dashing.jpg
  19. BIN static/img/Grassy.jpg
  20. BIN static/img/Hamad_Darwish_dot_com_Windows_Vista_Wallpapers_-11.jpg
  21. BIN static/img/Hamad_Darwish_dot_com_Windows_Vista_Wallpapers_-13.jpg
  22. BIN static/img/Hamad_Darwish_dot_com_Windows_Vista_Wallpapers_-15.jpg
  23. BIN static/img/Hamad_Darwish_dot_com_Windows_Vista_Wallpapers_-16.jpg
  24. BIN static/img/Hamad_Darwish_dot_com_Windows_Vista_Wallpapers_-18.jpg
  25. BIN static/img/Hamad_Darwish_dot_com_Windows_Vista_Wallpapers_-3.jpg
  26. BIN static/img/Hamad_Darwish_dot_com_Windows_Vista_Wallpapers_-5.jpg
  27. BIN static/img/Hamad_Darwish_dot_com_Windows_Vista_Wallpapers_-6.jpg
  28. BIN static/img/Jungle_Dreaming.jpg
  29. BIN static/img/KingdomOfHeaven.jpg
  30. BIN static/img/Lone_Tree_1600.jpg
  31. BIN static/img/Lost.jpg
  32. BIN static/img/Monument_Valley.jpg
  33. BIN static/img/Mt_Buller.jpg
  34. BIN static/img/Nexus-by-Burning-Liquid.jpg
  35. BIN static/img/Pacific.jpg
  36. BIN static/img/Reaching_for_the_Stars.jpg
  37. BIN static/img/Spot_of_Light.jpg
  38. BIN static/img/Summer_Sunflowers.jpg
  39. BIN static/img/Sun_ray_in_the_woods.jpg
  40. BIN static/img/TRILITH_by_tigaer.jpg
  41. BIN static/img/Terragen___The_Way_God_Made_Me.jpg
  42. BIN static/img/The-Greenway.jpg
  43. BIN static/img/The_Rock_by_DJMattRicks.jpg
  44. BIN static/img/Unforgettable-Days.jpg
  45. BIN static/img/Viva-La-Nature-5-(11).jpg
  46. BIN static/img/Viva-La-Nature-5-(15).jpg
  47. BIN static/img/Viva-La-Nature-5-(3).jpg
  48. BIN static/img/Viva-La-Nature-5-(4).jpg
  49. BIN static/img/Wafting.jpg
  50. BIN static/img/a_place_to_rest.jpg
  51. BIN static/img/a_year_has_gone.jpg
  52. BIN static/img/another-morning.jpg
  53. BIN static/img/azalea.jpg
  54. BIN static/img/beautiful-day.jpg
  55. BIN static/img/brothers.jpg
  56. BIN static/img/dedication.jpg
  57. BIN static/img/dreamy-world.jpg
  58. BIN static/img/elbalia.jpg
  59. BIN static/img/ethaer.jpg
  60. BIN static/img/forestfall.jpg
  61. BIN static/img/g.gif
  62. BIN static/img/hug-white.png
  63. BIN static/img/hug.jpg
  64. BIN static/img/jungle_bath.jpg
  65. BIN static/img/magic-tree.jpg
  66. BIN static/img/meelup-beach.jpg
  67. +75 −0 static/img/nature.txt
  68. BIN static/img/night_comes_down.jpg
  69. BIN static/img/no-more-rain.jpg
  70. BIN static/img/on-the-beach.jpg
  71. BIN static/img/paramount.jpg
  72. BIN static/img/red-rocks.jpg
  73. BIN static/img/s0.gif
  74. BIN static/img/s1.gif
  75. BIN static/img/s2.gif
  76. BIN static/img/s3.gif
  77. BIN static/img/s4.gif
  78. BIN static/img/s5.gif
  79. BIN static/img/s6.gif
  80. BIN static/img/s7.gif
  81. BIN static/img/sea-of-plague.jpg
  82. BIN static/img/shimuna.jpg
  83. BIN static/img/skyscrapers-&-lost-wonders_01.jpg
  84. BIN static/img/splatter.jpg
  85. BIN static/img/sprites.png
  86. BIN static/img/stonehenge_wallpaper.jpg
  87. BIN static/img/the-other-side.jpg
  88. BIN static/img/the-other-side.jpg.1
  89. BIN static/img/thetismoon2k72.jpg
  90. BIN static/img/tion.jpg
  91. BIN static/img/waterfall-desktop.jpg
  92. BIN static/img/west-new-york-girl.jpg
  93. BIN static/img/winter-landscape.jpg
  94. BIN static/img/winter-wonderland.jpg
  95. BIN static/img/yellow-field.jpg
  96. BIN static/nbloxFreeTetris.swf
  97. +2 −0 users/models.js
  98. +17 −0 views/chat.jade
  99. +21 −8 views/index.jade
  100. +12 −0 views/minimal-layout.jade
View
51 TODO
@@ -1,3 +1,52 @@
+split chat.jade into: listen.jade and vent.jade
+
+
+- Mandatory listener test noreg??
+listen->vent crasg
+
+
+* show who your previous listener was - info box with ability to message them on the forums, assign them positive feedback, or assign them negative feedback
+
+
+
+Each *User* instance has a property, an array, of previous partners - these are UIDs.
+When you join a room, your dyad partner's User.id gets pushed to the array, partnerList
+
+
+
+
+Whenever you get a new partner - the chat.js event/function is called - triggering a comm.request and gets the person's partnerList. it looks at partnerList[partnerList.length()-2] and returns it to the comm.request's callback function, which displays them. a javascript $("#MostRecentChatPartner").html() is what happens.
+Chat.jade needs a #MOstRecentChatPartner div
+
+
+function getPreviousPartner() {
+
+ x = User;// get the User object for the person sending the comm request
+ authServer.getUsernameFromListenerId(User.partner_list[User.partner_list.length()-2]);
+
+
+
+}
+
+
+* when you rate someone positive, or negative, optionally give them feedback or cancel it
+
+Before it sends the event, hide it and replace it with a new form, then you need to create the form, and have a submit button, and when the submit button is clicked THEN the comm/event ( from word^5) and also include the additional-comments
+
+
+* figure out why leaderboard isn't updating for users in real-time ... e.g. why doesn't "Zachary Burt" have any points?
+
+* figure out how many negative feedbacks have been assigned to Users with forum usernames... group by syntax, and paste it here
+
+* call joe esposito and figure out "getting started guide" for flaskDijscrape
+
+
+* create roleplay fetish chat site
+
+> respond to reddit thread
+
+
+
abuse mod tool
19 Don't auto reconnect - if you are a listener and your venter leaves.
20 make sure to hook up feedback to logged conversations so i can analyze
@@ -11,8 +60,6 @@ Ask listeners to fill out an explanation for why they rated the person good
13 show scrolling "TIP" bar linking to suicide threads, suicide hotline number, etc.
-14 Chat expands to fill browser
-
View
62 app.js
@@ -138,7 +138,7 @@ function(err) {
function(req, res) {
res.render("chat", {
type: "venter",
- layout: 'layout'
+ layout: 'minimal-layout'
});
});
@@ -147,7 +147,7 @@ function(err) {
if ((process.env.NODE_ENV || "development") === 'development') {
res.render("chat", {
type: "listener",
- layout: 'layout'
+ layout: 'minimal-layout'
});
}
else {
@@ -157,21 +157,26 @@ function(err) {
vB_dao.getEmailAndJoindateForUser(username, function(vB_info) {
res.render("chat", {
type: "listener",
- layout: 'layout',
+ layout: 'minimal-layout',
email: vB_info.email,
- created_at: vB_info.created_at,
+ created_at: vB_info.created_at,
show_intercom: true
});
});
- } else if(feedbackServer.ipAddressHasNeverReceivedNegativeFeedback(req.headers['x-forwarded-for'] || req.address.address)) {
- res.render("chat", {
- layout: 'layout',
- type: "listener",
- show_intercom: false
- });
- } else {
- res.render("listener-registration");
- }
+ }
+ else {
+ feedbackServer.ipAddressHasNeverReceivedNegativeFeedback(req.headers['x-forwarded-for'] || req.address.address, function(clean_record) {
+ if(clean_record) {
+ res.render("chat", {
+ layout: 'minimal-layout',
+ type: "listener",
+ show_intercom: false
+ });
+ } else {
+ res.render("listener-registration");
+ }
+ });
+ }
});
}
});
@@ -455,23 +460,23 @@ function(err) {
* Request the current position the client is in the queue for
*/
socketHandlers.queue = function(client, user, _, callback) {
-
- var queue_info = Room.getQueuePosition(user.id);
- log.logWaitTime({
- userid: user.id,
- user_type: queue_info.user_type,
- queuePosition: queue_info.queue_position,
- join_time: user.join_time,
- current_time: new Date().getTime()
- });
+
+ var queue_info = Room.getQueuePosition(user.id);
+ log.logWaitTime({
+ userid: user.id,
+ user_type: queue_info.user_type,
+ queuePosition: queue_info.queue_position,
+ join_time: user.join_time,
+ current_time: new Date().getTime()
+ });
callback(queue_info.queue_position);
};
socketHandlers.authenticateUser = function(client, user, data, callback) {
authServer.login(user.id, data.username, data.password,
function(success) {
- if (success) {
+ if (success) {
feedbackServer.creditFeedback({
id: user.id,
username: data.username
@@ -510,18 +515,23 @@ function(err) {
}
var listenerId = room.conversation.listener.userId;
- console.log('Adding feedback...');
+ console.log('Adding feedback...');
feedbackServer.addFeedback({
venter: venterId,
listener: listenerId,
direction: data.direction
});
- console.log('Sending acknowledgement....');
- console.log('sending to: ', listenerId);
+ console.log('Sending acknowledgement....');
+ console.log('sending to: ', listenerId);
room.sendToUser(listenerId, "received-feedback", data.direction);
};
+ socketHandlers.getPreviousPartner = function(client, user, data, callback) {
+ var previous_partners = User.getById(user.id).partner_list;
+ callback(authServer.getUsernameFromListenerId(previous_partners[previous_partners.length()-2]));
+ };
+
/**
* Request to join a channel based on the provided type
*/
View
@@ -169,7 +169,12 @@
log.store("joinRoom", listenerId);
var venter = User.getById(venterId);
+ venter.partner_list.push(listenerId);
var listener = User.getById(listenerId);
+ listener.partner_list.push(venterId);
+
+
+
var venterIP = venter ? venter.getIPAddress() || "" : "";
var listenerIP = listener ? listener.getIPAddress() || "" : "";
View
@@ -25,7 +25,8 @@ module.exports = function (config) {
"css/abuse.css",
"jquery-ui-1.8.13.custom.css",
"jquery.ui.datetime.css",
- "css/jquery-ui/jquery.ui.all.css"
+ "css/jquery-ui/jquery.ui.all.css",
+ "css/rage.css"
];
config.version = 0;
require('child_process').exec("git log -1 --format=format:%H", {
View
@@ -131,6 +131,51 @@
info('Connection error');
});
+
+ var wallpaper_timer;
+ $('#playGame').click(function() { window.Chat.ENTERTAINMENT_RUNNING = true; $("#chat_input").hide(); $("#column_left_chat").hide(); $("#entertainmentChoice").hide(); $("#entertainmentGame").show(); });
+ $('#playRelaxingSounds').click(function() {
+ window.Chat.ENTERTAINMENT_RUNNING = true; $("#chat_input").hide(); $("#column_left_chat").hide(); $("#entertainmentChoice").hide();
+ $("#entertainmentSounds").show();
+ $("#entertainmentSounds").append($("<iframe width=\"1\" height=\"1\" src=\"http://www.youtube.com/embed/uupzk-YCBO0?rel=0&autoplay=1\" frameborder=\"0\"></iframe>"));
+ var beautiful_wallpapers = ["the-other-side.jpg", "Hamad_Darwish_dot_com_Windows_Vista_Wallpapers_-3.jpg", "Hamad_Darwish_dot_com_Windows_Vista_Wallpapers_-5.jpg", "Hamad_Darwish_dot_com_Windows_Vista_Wallpapers_-16.jpg", "Hamad_Darwish_dot_com_Windows_Vista_Wallpapers_-6.jpg", "elbalia.jpg", "ethaer.jpg", "shimuna.jpg", "paramount.jpg", "brothers.jpg", "Monument_Valley.jpg", "TRILITH_by_tigaer.jpg", "Terragen___The_Way_God_Made_Me.jpg", "The_Rock_by_DJMattRicks.jpg", "Lost.jpg", "splatter.jpg", "Pacific.jpg", "Unforgettable-Days.jpg", "skyscrapers-&-lost-wonders_01.jpg", "winter-wonderland.jpg", "winter-landscape.jpg", "Mt_Buller.jpg", "Hamad_Darwish_dot_com_Windows_Vista_Wallpapers_-15.jpg", "forestfall.jpg", "Dashing.jpg", "meelup-beach.jpg", "tion.jpg", "Viva-La-Nature-5-(3).jpg", "Viva-La-Nature-5-(4).jpg", "Viva-La-Nature-5-(11).jpg", "Viva-La-Nature-5-(15).jpg", "on-the-beach.jpg", "red-rocks.jpg", "another-morning.jpg", "Atomicsunset.jpg", "waterfall-desktop.jpg", "461.jpg", "sea-of-plague.jpg", "Afternoon1_01.jpg", "Grassy.jpg", "Hamad_Darwish_dot_com_Windows_Vista_Wallpapers_-11.jpg", "Hamad_Darwish_dot_com_Windows_Vista_Wallpapers_-13.jpg", "Hamad_Darwish_dot_com_Windows_Vista_Wallpapers_-18.jpg", "Lone_Tree_1600.jpg", "a_place_to_rest.jpg", "12.jpg", "Jungle_Dreaming.jpg", "west-new-york-girl.jpg", "a_year_has_gone.jpg", "dedication.jpg", "azalea.jpg", "yellow-field.jpg", "Summer_Sunflowers.jpg", "The-Greenway.jpg", "Sun_ray_in_the_woods.jpg", "51200203.jpg", "stonehenge_wallpaper.jpg", "Spot_of_Light.jpg", "Wafting.jpg", "the-other-side.jpg", "4rest_by_UncleCameleon.jpg", "DarkblissWraith.jpg", "KingdomOfHeaven.jpg", "magic-tree.jpg", "Reaching_for_the_Stars.jpg", "dreamy-world.jpg", "447.jpg", "001.jpg", "002.jpg", "no-more-rain.jpg", "night_comes_down.jpg", "Nexus-by-Burning-Liquid.jpg", "thetismoon2k72.jpg", "jungle_bath.jpg", "beautiful-day.jpg"];
+ var show_new_wallpaper = function() {
+ var wallpaper = beautiful_wallpapers[Math.floor(Math.random() * beautiful_wallpapers.length)];
+ var $wallpaper_img = $("<img></img>");
+ $wallpaper_img.attr('src', 'img/' + wallpaper);
+ $wallpaper_img.hide();
+
+ $("#wallpapers img").fadeOut(2000, function() {
+ $(this).remove();
+ $("#wallpapers").append($wallpaper_img);
+ $("#wallpapers img").fadeIn(2000);
+ });
+
+
+ };
+
+ show_new_wallpaper();
+ wallpaper_timer = setInterval(function() { show_new_wallpaper(); }, 30*1000);
+ });
+
+
+
+
+ var $entertainment = $("div#entertainment");
+
+ var resetEntertainment = function() {
+ clearInterval(wallpaper_timer);
+ window.Chat.ENTERTAINMENT_RUNNING = false;
+ $("#entertainmentSounds iframe").remove();
+ $("#column_left_chat").show();
+ $("#chat_input").show();
+ $("#entertainmentChoice").show();
+ $("#entertainmentGame").hide();
+ $("#entertainmentSounds").hide();
+ $("#entertainment").hide();
+
+ };
+
var status = function(msg, cssClass, checkQueue) {
checkingQueue = checkQueue && msg;
@@ -142,7 +187,9 @@
$status.addClass(cssClass);
if(msgform) {
$status.text("Connected");
+ resetEntertainment();
} else {
+ $entertainment.show();
$status.text(msg);
}
queryQueuePosition();
@@ -231,6 +278,14 @@
});
$('#enable_sound').attr('checked', true);
+ $("#enable_sound").change(function() {
+ if (window.Chat.ENTERTAINMENT_RUNNING && !$(this).attr('checked')) {
+ $("#entertainmentSounds iframe").remove();
+ }
+ else if (window.Chat.ENTERTAINMENT_RUNNING) {
+ $("#entertainmentSounds").append($("<iframe width=\"1\" height=\"1\" src=\"http://www.youtube.com/embed/uupzk-YCBO0?rel=0&autoplay=1\" frameborder=\"0\"></iframe>"));
+ }
+ });
$('#enable_typing').attr('checked', true);
info('Initializing');
$("#main").hide();
@@ -294,19 +349,29 @@
window.gong = gong;
var scrollToBottomOfChat = function () {
- var scrollDiv = document.getElementById("column_left_chat"); //scroll to bottom of chat
- scrollDiv.scrollTop = scrollDiv.scrollHeight;
+ if(!window.Chat.ENTERTAINMENT_RUNNING) {
+ var scrollDiv = document.getElementById("column_left_chat"); //scroll to bottom of chat
+ scrollDiv.scrollTop = scrollDiv.scrollHeight;
+ }
};
+ var rageSubstitute = function($td){
+ var rages = ['/yuno', '/yey', '/wtf', '/why', '/whoa', '/wetodddog', '/welp', '/wayevil', '/wat', '/vuvu', '/uhm', '/trollmom', '/trolldad', '/troll', '/trap', '/teethrage', '/sweetjesus', '/surprised', '/suprised', '/straight', '/steve', '/stare', '/son', '/serious', '/schlick', '/sadtroll', '/sad', '/rtroll', '/rmilk', '/red', '/poker', '/pissed', '/pickletime', '/pfttxt', '/pft', '/perfect', '/omg', '/okay', '/ohcrap', '/notsure', '/notokay', '/notbad', '/nomegusta', '/milk', '/melvin', '/megustaperfect', '/megusta', '/longneck', '/lol', '/jizzsplosion', '/jackieeeee!', '/itstime', '/ilovethebeefytaco', '/ifeelsyabreh', '/hmm', '/high', '/hehheh', '/harpdarp', '/happy', '/gyey', '/gwat', '/gwah', '/guhm', '/gtroll', '/gtongue', '/gtfo', '/gsmile', '/gserious', '/gohno', '/ghappy', '/gfu', '/gbeh', '/gaytroll', '/gah', '/fy1', '/futext', '/fumanchu', '/fuckthatshit', '/fu', '/freddie', '/foreveralonelaugh', '/foreveralone', '/femyao', '/fap', '/eyes', '/ewbtetext', '/ewbte', '/dude', '/deviltroll', '/creepy', '/challengeaccepted', '/cereal', '/bzz', '/blackhair', '/biggusta', '/beh', '/awyeah', '/awyea', '/awman', '/aintthatsomeshit'];
+ window._.each(rages.reverse(), function(value, key, list) {
+ $td.html($td.html().replace(new RegExp("(\\" + value + ")", "g"), '<a href="' + value + '"/>'));
+ });
+ };
+
i = 0;
var titleCurrentlyChanging = false;
function addMessage(from, msg, cssClass) {
var $td = $("<span>");
- if (msg instanceof $) {
+ if (msg instanceof $) { // when the fuck does this happen. trace it some time when you're sober, jackass.
$td.append(msg);
} else {
$td.text(capitalize(from) + ": " + msg);
}
+ rageSubstitute($td);
$('#chatWindow > div:last')
.append($("<div>")
.addClass(cssClass || (from === 'Me' ? 'blue-row' : from === 'System' ? 'off-white-row' : 'white-row'))
View
@@ -27,7 +27,7 @@
window.COMPASSION_PIT_VERSION = undefined;
// amount of time to consider a disconnect a "real" disconnect.
- var DISCONNECT_LEEWAY = 10 * 1000;
+ var DISCONNECT_LEEWAY = 30 * 1000;
var BACKLOG_SIZE = 100;
@@ -79,7 +79,6 @@
socketio_addr = null;
}
- window.log('determining sio addr');
if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){
@@ -105,9 +104,8 @@
var events = {};
- window.log('declaring emit');
+
var emit = function (event) {
- window.log("Emit was called for event " + event);
var callbacks = has.call(events, event) && events[event];
if (callbacks) {
var args = Array.prototype.slice.call(arguments, 1);
@@ -135,7 +133,6 @@
var sentConnectedEvents = false;
var register = function () {
- window.log("big register method being called.");
currentConnectIndex += 1;
isRegistered = false;
var registerMessage = {
@@ -312,7 +309,6 @@
checkSend();
};
- window.log('returning from comm');
return {
on: function (event, callback) {
@@ -341,7 +337,6 @@
socket.socket.reconnect();
},
register: function (userId) {
- window.log("calling register method");
register();
}
};
Oops, something went wrong.

0 comments on commit 78c530e

Please sign in to comment.