From d87000f78d011fbb4547912e958fa80f43882e1d Mon Sep 17 00:00:00 2001 From: John Maguire Date: Thu, 21 Mar 2013 02:58:40 -0400 Subject: [PATCH] give users module proper usage info, subsequently fix empty params erroring --- modules/users/commands.js | 6 +++++- modules/users/usage.json | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 modules/users/usage.json diff --git a/modules/users/commands.js b/modules/users/commands.js index 26dfeb4..57452c1 100644 --- a/modules/users/commands.js +++ b/modules/users/commands.js @@ -96,7 +96,11 @@ var commands = function(dbot) { return false; } }; - + + commands['~alias'].regex = [/^~alias ([\d\w[\]{}^|\\`_-]+?)/, 2]; + commands['~setaliasparent'].regex = [/^~setaliasparent ([\d\w[\]{}^|\\`_-]+?)/, 2]; + commands['~mergeusers'].regex = [/^~mergeusers ([\d\w[\]{}^|\\`_-]+?)\s*?([\d\w[\]{}^|\\`_-]+?)/, 3]; + commands['~setaliasparent'].access = 'moderator'; commands['~mergeusers'].access = 'moderator'; diff --git a/modules/users/usage.json b/modules/users/usage.json new file mode 100644 index 0000000..203bd4d --- /dev/null +++ b/modules/users/usage.json @@ -0,0 +1,5 @@ +{ + "~alias": "~alias [nick]", + "~setaliasparent": "~setaliasparent [nick]", + "~mergeusers": "~mergeusers [primary] [secondary]" +}