2013-01-22 21:44:45 +01:00
|
|
|
var _ = require('underscore')._;
|
|
|
|
|
|
|
|
var profile = function(dbot) {
|
|
|
|
|
|
|
|
this.onLoad = function(){
|
2013-01-28 02:38:36 +01:00
|
|
|
var api = this.api;
|
2013-01-22 21:44:45 +01:00
|
|
|
var schema = this.config.schema;
|
|
|
|
|
2013-01-25 16:13:12 +01:00
|
|
|
// Add API Hooks
|
|
|
|
dbot.api.command.addHook('~setaliasparent', this.api.renameProfile);
|
2013-04-20 23:51:36 +02:00
|
|
|
//TODO(@samstudio8) Profile Merging
|
|
|
|
//dbot.api.command.addHook('~mergeusers', this.api.mergeProfile);
|
2013-01-29 00:40:32 +01:00
|
|
|
dbot.api.event.addHook('new_user', this.api.createProfile);
|
2013-01-22 21:44:45 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
exports.fetch = function(dbot) {
|
|
|
|
return new profile(dbot);
|
|
|
|
};
|