forked from GitHub/dbot
sorry @samstudio8 ill clean it up
This commit is contained in:
parent
6156de73b1
commit
4f01cc2958
@ -16,5 +16,6 @@
|
|||||||
"preferences": {
|
"preferences": {
|
||||||
"timezone": null
|
"timezone": null
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"dependencies": [ "quotes", "command" ]
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,8 @@ var pages = function(dbot) {
|
|||||||
"lines", "words", "lincent", "wpl", "in_mentions"]
|
"lines", "words", "lincent", "wpl", "in_mentions"]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
res.render('profile', {
|
res.render('profile', {
|
||||||
'name': dbot.config.name,
|
'name': dbot.config.name,
|
||||||
'connection': connection,
|
'connection': connection,
|
||||||
@ -27,6 +29,17 @@ var pages = function(dbot) {
|
|||||||
var connection = req.params.connection;
|
var connection = req.params.connection;
|
||||||
var profiles = dbot.db.profiles[connection];
|
var profiles = dbot.db.profiles[connection];
|
||||||
|
|
||||||
|
// TODO: Clean up
|
||||||
|
_.each(profiles, function(profile) {
|
||||||
|
if(_.has(dbot.db.quoteArrs, profile.profile.primary)) {
|
||||||
|
var category = dbot.db.quoteArrs[profile.profile.primary];
|
||||||
|
var avatar = _.find(category, function(quote) {
|
||||||
|
return quote.match(/(\.jpg|\.png|\.jpeg)$/i);
|
||||||
|
});
|
||||||
|
if(avatar) profile.profile.avatar = avatar;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
res.render('profile_grid', {
|
res.render('profile_grid', {
|
||||||
'name': dbot.config.name,
|
'name': dbot.config.name,
|
||||||
'connection': connection,
|
'connection': connection,
|
||||||
|
Loading…
Reference in New Issue
Block a user