Added function for rules, and moved thumbnail/data somewhat around for better readability

This commit is contained in:
Kasper Rynning-Tønnesen
2018-09-27 22:03:23 +02:00
parent 5a84a4bc70
commit 0b3e7177b1
12 changed files with 599 additions and 208 deletions

View File

@@ -190,6 +190,17 @@ module.exports = function() {
Suggestions.description(msg, coll, guid, offline, socket);
});
socket.on('suggest_rules', function(msg){
if(msg.hasOwnProperty("channel") && msg.channel.indexOf("?") > -1){
var _list = msg.channel.substring(0, msg.channel.indexOf("?"));
msg.channel = _list;
}
if(msg.hasOwnProperty("channel")) {
msg.channel = Functions.encodeChannelName(msg.channel);
}
Suggestions.rules(msg, coll, guid, offline, socket);
});
socket.on("namechange", function(msg) {
if(msg.hasOwnProperty("channel") && msg.channel.indexOf("?") > -1){
var _list = msg.channel.substring(0, msg.channel.indexOf("?"));