mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 14:29:29 +01:00
change test_setprop and test_setprop to not have test in them (or underscores)
This commit is contained in:
parent
9c7006a983
commit
6156de73b1
@ -1,9 +1,9 @@
|
|||||||
var _ = require('underscore')._;
|
var _ = require('underscore')._;
|
||||||
|
|
||||||
var commands = function(dbot){
|
var commands = function(dbot){
|
||||||
var cmds = {
|
var commands = {
|
||||||
|
|
||||||
"~test_getprop": function(event){
|
"~getprop": function(event){
|
||||||
if(event.params[1]){
|
if(event.params[1]){
|
||||||
var res = dbot.db.profiles[event.server][event.user.toLowerCase()].profile[event.params[1]];
|
var res = dbot.db.profiles[event.server][event.user.toLowerCase()].profile[event.params[1]];
|
||||||
if(res){
|
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(event.input[1] && event.input[2]){
|
||||||
if(_.has(this.config.schema.profile, event.input[1])){
|
if(_.has(this.config.schema.profile, event.input[1])){
|
||||||
dbot.db.profiles[event.server][event.user.toLowerCase()].profile[event.input[1]] = event.input[2];
|
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){
|
exports.fetch = function(dbot){
|
||||||
|
Loading…
Reference in New Issue
Block a user