3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-24 03:33:07 +01:00

sorry @samstudio8 ill clean it up

This commit is contained in:
reality 2013-01-25 00:40:42 +00:00
parent 6156de73b1
commit 4f01cc2958
2 changed files with 15 additions and 1 deletions

View File

@ -16,5 +16,6 @@
"preferences": {
"timezone": null
}
}
},
"dependencies": [ "quotes", "command" ]
}

View File

@ -14,6 +14,8 @@ var pages = function(dbot) {
"lines", "words", "lincent", "wpl", "in_mentions"]
);
res.render('profile', {
'name': dbot.config.name,
'connection': connection,
@ -27,6 +29,17 @@ var pages = function(dbot) {
var connection = req.params.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', {
'name': dbot.config.name,
'connection': connection,