diff --git a/lib/gather/controller.js b/lib/gather/controller.js index 1223850..a8a123c 100644 --- a/lib/gather/controller.js +++ b/lib/gather/controller.js @@ -23,6 +23,7 @@ var Map = require("./map"); var Server = require("./server"); var Gather = require("./gather_singleton"); var _ = require("lodash"); +var winston = require("winston"); module.exports = function (namespace) { var refreshGather = _.debounce(function () { @@ -54,6 +55,7 @@ module.exports = function (namespace) { socket.on("gather:join", function (data) { let gather = Gather.current; if (gather.can("addGatherer")) gather.addGatherer(socket._user); + winston.info("Gather Joiner", JSON.stringify(socket._user)); refreshGather(); }); @@ -67,6 +69,7 @@ module.exports = function (namespace) { socket.on("gather:leave", function (data) { let gather = Gather.current; if (gather.can("removeGatherer")) gather.removeGatherer(socket._user); + winston.info("Gather Leaver", JSON.stringify(socket._user)); refreshGather(); }); @@ -97,6 +100,10 @@ module.exports = function (namespace) { gather.confirmSelection(socket._user); } + winston.info("Selection Data", + JSON.stringify(socket._user), + JSON.stringify(data)); + refreshGather(); }); @@ -118,6 +125,10 @@ module.exports = function (namespace) { gather.voteForServer(socket._user, data.server.id); } + winston.info("Vote Data", + JSON.stringify(socket._user), + JSON.stringify(data)); + refreshGather(); });