mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +00:00
Updates for channel-user-password modal and channel-info input-fields
This commit is contained in:
@@ -438,13 +438,13 @@ module.exports = function() {
|
||||
List.skip(list, guid, coll.replace(/ /g,''), offline, socket);
|
||||
});
|
||||
|
||||
socket.on('conf', function(params)
|
||||
socket.on('conf', function(conf)
|
||||
{
|
||||
if(conf.hasOwnProperty("channel") && conf.channel.indexOf("?") > -1){
|
||||
var _list = conf.channel.substring(0, conf.channel.indexOf("?"));
|
||||
conf.channel = _list;
|
||||
}
|
||||
ListSettings.conf_function(params, coll.replace(/ /g,''), guid, offline, socket);
|
||||
ListSettings.conf_function(conf, coll.replace(/ /g,''), guid, offline, socket);
|
||||
});
|
||||
|
||||
socket.on('shuffle', function(msg)
|
||||
@@ -470,10 +470,12 @@ module.exports = function() {
|
||||
|
||||
socket.on('change_channel', function(obj)
|
||||
{
|
||||
if(obj.hasOwnProperty("channel") && obj.channel.indexOf("?") > -1){
|
||||
if(obj == undefined && coll != undefined) {
|
||||
obj.channel = coll;
|
||||
} else if(obj.hasOwnProperty("channel") && obj.channel.indexOf("?") > -1){
|
||||
var _list = obj.channel.substring(0, obj.channel.indexOf("?"));
|
||||
obj.channel = _list;
|
||||
}
|
||||
}
|
||||
if(coll === undefined && obj !== undefined && obj.channel !== undefined){
|
||||
try {
|
||||
coll = obj.channel.toLowerCase().replace(/ /g,'');
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
function thumbnail(msg, coll, guid, offline, socket) {
|
||||
if(msg.thumbnail && msg.channel && msg.thumbnail.indexOf("i.imgur.com") > -1){
|
||||
if(msg.thumbnail != undefined && msg.channel && msg.channel != undefined){
|
||||
if(typeof(msg.channel) != "string" || typeof(msg.thumbnail) != "string")
|
||||
{
|
||||
var result = {
|
||||
@@ -31,9 +31,10 @@ function thumbnail(msg, coll, guid, offline, socket) {
|
||||
if(adminpass != "" || msg.adminpass == undefined) {
|
||||
msg.adminpass = adminpass;
|
||||
}
|
||||
|
||||
msg.thumbnail = msg.thumbnail.replace(/^https?\:\/\//i, "");
|
||||
if(msg.thumbnail.substring(0,2) != "//") msg.thumbnail = "//" + msg.thumbnail;
|
||||
if(msg.thumbnail != "") {
|
||||
msg.thumbnail = msg.thumbnail.replace(/^https?\:\/\//i, "");
|
||||
if(msg.thumbnail.substring(0,2) != "//") msg.thumbnail = "//" + msg.thumbnail;
|
||||
}
|
||||
var channel = msg.channel.toLowerCase();
|
||||
var hash = Functions.hash_pass(Functions.hash_pass(Functions.decrypt_string(msg.adminpass),true));
|
||||
db.collection(channel + "_settings").find({id: "config"}, function(err, docs){
|
||||
|
||||
Reference in New Issue
Block a user