diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/config.cpp | 1 | ||||
-rw-r--r-- | src/modes.cpp | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/config.cpp b/src/config.cpp index 9804161b1..dac22f5ab 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -1084,6 +1084,7 @@ void ServerConfig::Read() {"options", "newscount", "3", new ValueContainerUInt(&this->NewsCount), DT_UINTEGER, NoValidation}, {"options", "ulineservers", "", new ValueContainerString(&UlineServers), DT_STRING, NoValidation}, {"options", "mlock", "+nrt", new ValueContainerString(&this->MLock), DT_STRING, NoValidation}, + {"options", "nomlock", "", new ValueContainerString(&this->NoMLock), DT_STRING, NoValidation}, {"options", "botmodes", "", new ValueContainerString(&this->BotModes), DT_STRING, NoValidation}, {"options", "maxretries", "10", new ValueContainerUInt(&this->MaxRetries), DT_UINTEGER, NoValidation}, {"options", "retrywait", "60", new ValueContainerInt(&this->RetryWait), DT_INTEGER, ValidateNotZero}, diff --git a/src/modes.cpp b/src/modes.cpp index 4f09e0545..bc870cb1b 100644 --- a/src/modes.cpp +++ b/src/modes.cpp @@ -192,6 +192,17 @@ ChannelMode::~ChannelMode() { } +/** Can a user set this mode, used for mlock + * NOTE: User CAN be NULL, this is for checking if it can be locked with defcon + * @param u The user, or NULL + */ +bool ChannelMode::CanSet(User *u) const +{ + if (Config->NoMLock.find(this->ModeChar) != Anope::string::npos) + return false; + return true; +} + /** Default constructor * @param mName The mode name * @param mNameAsString The mode name as a string |