Custom codes are currently broken in master in the sense that previously saved custom codes (saved before commit 9a178605c5960f82e91fdc557ba8d29965ce6eec) will not work properly and also newly added custom codes will be saved in upper case.
For example:
A custom code previously saved as Test will not work.
A custom code HahaCat will be saved as HAHACAT and be listed as HAHACAT by using !customcodes.
This fix will save custom codes as-is and still allow adding a level with a custom code to the queue ignoring the case.
E.g. !add HAHAcat will work when there is a custom code named HahaCat.
This PR also adds test cases testing this behaviour, see tests/chat-logs/logs/custom-codes.test.log.
Also adds a !customcode load command to reload the ./customCodes.json file into memory.
!restore command
This PR also repairs the !restore command by removing it, and adding a new !persistence command which gives control over how and if data is loaded/saved. See updated README.md for a description of how it works.
This fixes #33.
Custom Codes
Custom codes are currently broken in
master
in the sense that previously saved custom codes (saved before commit9a178605c5960f82e91fdc557ba8d29965ce6eec
) will not work properly and also newly added custom codes will be saved in upper case. For example: A custom code previously saved asTest
will not work. A custom codeHahaCat
will be saved asHAHACAT
and be listed asHAHACAT
by using!customcodes
. This fix will save custom codes as-is and still allow adding a level with a custom code to the queue ignoring the case. E.g.!add HAHAcat
will work when there is a custom code namedHahaCat
. This PR also adds test cases testing this behaviour, seetests/chat-logs/logs/custom-codes.test.log
. Also adds a!customcode load
command to reload the./customCodes.json
file into memory.!restore command
This PR also repairs the
!restore
command by removing it, and adding a new!persistence
command which gives control over how and if data is loaded/saved. See updatedREADME.md
for a description of how it works.