Skip to content
This repository was archived by the owner on Jul 17, 2020. It is now read-only.

Commit 648baf7

Browse files
committed
fixing
1 parent 185a905 commit 648baf7

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

master.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4961,14 +4961,17 @@ function learn ( args ) {
49614961
date : new Date()
49624962
};
49634963

4964+
// this needs to be lowercased before we check if it is valid, otherwise !!help can be overwritten with !!HELP (true for all commands)
4965+
command.name = command.name.toLowerCase();
4966+
49644967
//a truthy value, unintuitively, means it isn't valid, because it returns
49654968
// an error message
49664969
var errorMessage = checkCommand( command );
49674970
if ( errorMessage ) {
49684971
return errorMessage;
49694972
}
49704973

4971-
command.name = command.name.toLowerCase();
4974+
49724975
command.input = new RegExp( command.input );
49734976
command.description = [
49744977
'User-taught command:',

0 commit comments

Comments
 (0)