File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 11/*
22activation_example:!verify-admin @Astrid, !verify-admin -help
3- regex:^!verify-admin\u0020?
3+ regex:^!(?:un)? verify-admin\u0020?
44flags:gi
55*/
66
@@ -12,7 +12,7 @@ if (current.channel == 'GD51HTR46' || current.channel == 'G9LAJG7G8' || current.
1212 var slacker = new x_snc_slackerbot . Slacker ( ) ;
1313
1414 // Grab user ID and then prep invocation if User-visible info provided
15- var invocation = current . text . replace ( / ^ ! v e r i f y - a d m i n \u0020 ? / gi, '' ) . trim ( ) ;
15+ var invocation = current . text . replace ( / ^ ! (?: u n ) ? v e r i f y - a d m i n \u0020 ? / gi, '' ) . trim ( ) ;
1616 var paramArr = invocation . split ( ' ' ) ;
1717
1818 if ( paramArr . length == 0 ) {
@@ -42,7 +42,10 @@ if (current.channel == 'GD51HTR46' || current.channel == 'G9LAJG7G8' || current.
4242 messageBody = 'Please only provide one verify parameter in your message. Verification message ignored.' ;
4343 slacker . send_chat ( current , messageBody , true ) ;
4444 } else {
45- if ( paramArr . indexOf ( '-v' ) > - 1 ) {
45+ if ( / ^ ! u n v e r i f y / . test ( current . text ) ) {
46+ verificationStatus = false ;
47+ }
48+ else if ( paramArr . indexOf ( '-v' ) > - 1 ) {
4649 verificationStatus = true ;
4750 }
4851
You can’t perform that action at this time.
0 commit comments