diff --git a/modules/quotes/commands.js b/modules/quotes/commands.js index 83e596a..9a379d8 100644 --- a/modules/quotes/commands.js +++ b/modules/quotes/commands.js @@ -11,6 +11,10 @@ var commands = function(dbot) { var key = event.input[1].toLowerCase().trim(), quote = event.input[2]; + var server=event.server, + user=event.rUser; + if (dbot.users.api.isKnownUser(server,user,function(x) {return x})==true) + { this.api.addQuote(key, quote, event.user, function(newCount) { if(newCount) { dbot.api.event.emit('~qadd', [ key, quote ]); @@ -22,6 +26,10 @@ var commands = function(dbot) { event.reply(dbot.t('quote_exists')); } }); + } + else{ + event.reply(dbot.t('You have no permissions to add quotes. :(')); + } }, /*** Quote Retrieval ***/ diff --git a/modules/users/config.json b/modules/users/config.json index c9b6aa2..1a8c339 100644 --- a/modules/users/config.json +++ b/modules/users/config.json @@ -1,6 +1,6 @@ { "ignorable": false, - "dependencies": [ "event" ], + "dependencies": [ "event" , "users"], "dbKeys": [ "knownUsers" ], "dbType": "redis" }