From 1e995d7bbafc46fd70e0a379ecc646897843c365 Mon Sep 17 00:00:00 2001 From: reality Date: Wed, 23 Oct 2013 19:53:14 +0000 Subject: [PATCH] fix profile --- modules/profile/commands.js | 6 +++--- modules/profile/config.json | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/profile/commands.js b/modules/profile/commands.js index 8900e68..e33d071 100644 --- a/modules/profile/commands.js +++ b/modules/profile/commands.js @@ -2,7 +2,7 @@ var _ = require('underscore')._; var commands = function(dbot){ var commands = { - '~getprop': function(event){ + '~get': function(event){ if(event.params[1]){ if(_.has(this.config.schema.profile, event.params[1])){ this.api.getProperty(event.server, event.user, event.params[1], function(reply){ @@ -14,7 +14,7 @@ var commands = function(dbot){ } }, - '~setprop': function(event){ + '~set': function(event){ if(event.input[1] && event.input[2]){ if(_.has(this.config.schema.profile, event.input[1])){ this.api.setProperty(event.server, event.user, event.input[1], event.input[2], function(reply){ @@ -31,7 +31,7 @@ var commands = function(dbot){ event.reply(dbot.api.web.getUrl('profile/' + event.server + '/' + user)); } }; - commands['~setprop'].regex = [/~setprop ([^ ]+) (.+)/, 3]; + commands['~set'].regex = [/~set ([^ ]+) (.+)/, 3]; return commands; }; diff --git a/modules/profile/config.json b/modules/profile/config.json index 7a9dbec..75c5d22 100644 --- a/modules/profile/config.json +++ b/modules/profile/config.json @@ -8,9 +8,10 @@ "tagline": null, "avatar": null, "bio": null, + "lastfm": null, "favourites": { "colour": null - }, + } } }, "dependencies": [ "web", "quotes", "users" ]