1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 12:46:39 +02:00

Added options:nomlock

This commit is contained in:
Adam
2011-01-19 00:31:18 -05:00
parent e7a8bcc30b
commit ab2e34d817
6 changed files with 24 additions and 2 deletions
+7
View File
@@ -519,6 +519,13 @@ options
*/
mlock = "+nrt"
/*
* Modes that will not be allowed to be locked. Oper only modes such as +O
* are always restricted from regular users and is not affected by this.
* Leave blank for no restrictions.
*/
nomlock = "z"
/*
* Modes to set on service bots when they join channels, comment this out for no modes
*/
+2 -1
View File
@@ -4,8 +4,9 @@ memoserv:modules added ms_ignore
chanserv:modules added cs_clone and cs_mode
nickserv:suspendexpire and nickserv:forbidexpire added
chanserv:suspendexpire and chanserv:forbidexpire added
added cs_entrymsg
module added cs_entrymsg
nickserv:modules added ns_ajoin
options:nomlock added
Anope Version 1.9.3
------------------
+2
View File
@@ -544,6 +544,8 @@ class CoreExport ServerConfig
unsigned NewsCount;
/* Default mlock modes */
Anope::string MLock;
/* Unmlockable modes */
Anope::string NoMLock;
/* Default botmodes on channels, defaults to ao */
Anope::string BotModes;
/* THe actual modes */
+1 -1
View File
@@ -195,7 +195,7 @@ class CoreExport ChannelMode : public Mode
* NOTE: User CAN be NULL, this is for checking if it can be locked with defcon
* @param u The user, or NULL
*/
virtual bool CanSet(User *u) const { return true; }
bool CanSet(User *u) const;
};
+1
View File
@@ -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},
+11
View File
@@ -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