Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions Parsers/Admin tool - Verify.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
activation_example:!verify-admin @Astrid, !verify-admin -help
regex:^!verify-admin\u0020?
regex:^!(?:un)?verify-admin\u0020?
flags:gi
*/

Expand All @@ -12,7 +12,7 @@ if (current.channel == 'GD51HTR46' || current.channel == 'G9LAJG7G8' || current.
var slacker = new x_snc_slackerbot.Slacker();

// Grab user ID and then prep invocation if User-visible info provided
var invocation = current.text.replace(/^!verify-admin\u0020?/gi,'').trim();
var invocation = current.text.replace(/^!(?:un)?verify-admin\u0020?/gi,'').trim();
var paramArr = invocation.split(' ');

if(paramArr.length == 0){
Expand Down Expand Up @@ -42,7 +42,10 @@ if (current.channel == 'GD51HTR46' || current.channel == 'G9LAJG7G8' || current.
messageBody = 'Please only provide one verify parameter in your message. Verification message ignored.';
slacker.send_chat(current, messageBody, true);
} else {
if(paramArr.indexOf('-v') > -1){
if(/^!unverify/.test(current.text)){
verificationStatus = false;
}
else if(paramArr.indexOf('-v') > -1){
verificationStatus = true;
}

Expand Down
Loading