3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-23 20:39:25 +01:00

change test_setprop and test_setprop to not have test in them (or underscores)

This commit is contained in:
reality 2013-01-24 22:44:41 +00:00
parent 9c7006a983
commit 6156de73b1

View File

@ -1,9 +1,9 @@
var _ = require('underscore')._;
var commands = function(dbot){
var cmds = {
var commands = {
"~test_getprop": function(event){
"~getprop": function(event){
if(event.params[1]){
var res = dbot.db.profiles[event.server][event.user.toLowerCase()].profile[event.params[1]];
if(res){
@ -15,7 +15,7 @@ var commands = function(dbot){
}
},
"~test_setprop": function(event){
"~setprop": function(event){
if(event.input[1] && event.input[2]){
if(_.has(this.config.schema.profile, event.input[1])){
dbot.db.profiles[event.server][event.user.toLowerCase()].profile[event.input[1]] = event.input[2];
@ -27,9 +27,9 @@ var commands = function(dbot){
}
}
};
cmds['~test_setprop'].regex = [/~test_setprop ([^ ]+) (.+)/, 3];
commands['~setprop'].regex = [/~setprop ([^ ]+) (.+)/, 3];
return cmds;
return commands;
};
exports.fetch = function(dbot){