ensl_gathers/lib/gather/controller.js

36 lines
592 B
JavaScript
Raw Normal View History

"use strict";
/*
* Gather Controller
*
* Server API
2015-07-22 23:30:14 +00:00
* gather:refresh - Refreshes active gather
*
* Client API
2015-07-22 23:30:14 +00:00
* gather:join - Assigns user to gather
* gather:vote - Assigns vote to map, captain or server
*
*/
var Gather = require("./gather");
2015-07-22 23:30:14 +00:00
var latestGather = new Gather();
module.exports = function (namespace) {
2015-07-22 23:30:14 +00:00
var refreshGather = function () {
namespace.emit("gather:refresh", {
gather: gather
});
};
namespace.on("connection", function (socket) {
socket.on("gather:join", function (data) {
});
socket.on("gather:vote", function (data) {
});
});
};