mirror of
https://github.com/exane/not-gwent-online
synced 2024-12-23 21:03:14 +00:00
test
This commit is contained in:
parent
91cd34638f
commit
382e7f5c32
@ -17,6 +17,9 @@ global.io = require("socket.io")(app);
|
||||
|
||||
app.listen(16918);
|
||||
|
||||
var admin = io.of("/admin");
|
||||
|
||||
|
||||
io.on("connection", function(socket) { //global connection
|
||||
var user;
|
||||
connections.add(user = User(socket));
|
||||
@ -32,4 +35,13 @@ io.on("connection", function(socket) { //global connection
|
||||
|
||||
|
||||
io.emit("update:playerOnline", connections.length());
|
||||
})
|
||||
|
||||
admin.on("connection", function(socket) {
|
||||
socket.on("sendMessage", function(msg) {
|
||||
console.log("admin send msg: " + msg);
|
||||
io.emit("notification", {
|
||||
message: msg
|
||||
})
|
||||
})
|
||||
})
|
Loading…
Reference in New Issue
Block a user