Names reimplemented, just a little better

This commit is contained in:
Kasper Rynning-Tønnesen
2017-10-11 12:22:08 +02:00
parent f13ba939a4
commit c04614e95b
8 changed files with 228 additions and 163 deletions

View File

@@ -79,6 +79,18 @@ module.exports = function() {
Suggestions.description(msg, coll, guid, offline, socket);
});
socket.on("namechange", function(msg) {
Chat.namechange(msg, guid, socket);
});
socket.on("removename", function(msg) {
if(typeof(msg) != "object" || !msg.hasOwnProperty("channel")) {
socket.emit("update_required");
return;
}
Chat.removename(guid, msg.channel);
});
socket.on("offline", function(msg){
if(!msg.hasOwnProperty('status') && !msg.hasOwnProperty('channel')) {
socket.emit("update_required");