diff options
author | Adam <Adam@anope.org> | 2011-01-19 00:31:18 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-01-19 00:31:18 -0500 |
commit | ab2e34d817bc78bd1342996e0ec5bdc2efa6062f (patch) | |
tree | b903b6c71ce7a61ec110e1ad62b0031ed105d9d4 /src | |
parent | e7a8bcc30ba5bef41b7f59386856b813b7979532 (diff) |
Added options:nomlock
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 |