diff options
author | Peter Powell <petpow@saberuk.com> | 2017-10-16 04:14:37 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2017-10-17 20:29:15 +0100 |
commit | aac644de3da4fe76dc912f6c8ef451c2dc75509c (patch) | |
tree | 61c06794b904385d912c3ae8a28b7ef20ea7d0d8 /include/configreader.h | |
parent | 5b5e898703c09cdf732858432be4a41b54770802 (diff) |
Clean up the command disabling logic.
- Read the disabled command list in ApplyDisabledCommands() instead
of storing it in a global which is only accessed on rehash.
- Write debug messages to the log when disabling commands.
- Use irc::spacesepstream instead of std::stringstream.
Diffstat (limited to 'include/configreader.h')
-rw-r--r-- | include/configreader.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/include/configreader.h b/include/configreader.h index a98736640..001d4a92a 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -311,12 +311,6 @@ class CoreExport ServerConfig */ bool DisabledDontExist; - /** This variable contains a space-seperated list - * of commands which are disabled by the - * administrator of the server for non-opers. - */ - std::string DisabledCommands; - /** This variable identifies which usermodes have been diabled. */ std::bitset<64> DisabledUModes; @@ -484,7 +478,8 @@ class CoreExport ServerConfig void Fill(); - bool ApplyDisabledCommands(const std::string& data); + /** Disables the commands specified in <disabled:commands>. */ + bool ApplyDisabledCommands(); /** Escapes a value for storage in a configuration key. * @param str The string to escape. |