mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 18:49:03 -04:00
Add security:genericoper as requested by Strawberry and TwinShadow.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11098 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
c5f32b22fb
commit
9bca438482
@ -545,6 +545,12 @@
|
||||
# banned on.
|
||||
restrictbannedusers="yes"
|
||||
|
||||
# genericoper: Setting this value makes all opers on this server
|
||||
# appear as 'is an IRC operator' in their WHOIS, regardless of their
|
||||
# oper type, however oper types are still used internally. This only
|
||||
# affects the display in WHOIS.
|
||||
genericoper="no"
|
||||
|
||||
# userstats: /stats commands that users can run (opers can run all).
|
||||
userstats="Pu">
|
||||
|
||||
|
@ -565,6 +565,12 @@ class CoreExport ServerConfig : public Extensible
|
||||
*/
|
||||
bool writelog;
|
||||
|
||||
/** If set to true, then all opers on this server are
|
||||
* shown with a generic 'is an IRC operator' line rather
|
||||
* than the oper type. Oper types are still used internally.
|
||||
*/
|
||||
bool GenericOper;
|
||||
|
||||
/** If this value is true, banned users (+b, not extbans) will not be able to change nick
|
||||
* if banned on any channel, nor to message them.
|
||||
*/
|
||||
|
@ -61,7 +61,10 @@ void do_whois(InspIRCd* ServerInstance, User* user, User* dest,unsigned long sig
|
||||
|
||||
if (IS_OPER(dest))
|
||||
{
|
||||
ServerInstance->SendWhoisLine(user, dest, 313, "%s %s :is %s %s on %s",user->nick.c_str(), dest->nick.c_str(), (strchr("AEIOUaeiou",dest->oper[0]) ? "an" : "a"),irc::Spacify(dest->oper.c_str()), ServerInstance->Config->Network);
|
||||
if (ServerInstance->Config->GenericOper)
|
||||
ServerInstance->SendWhoisLine(user, dest, 313, "%s %s :is an IRC operator",user->nick.c_str(), dest->nick.c_str());
|
||||
else
|
||||
ServerInstance->SendWhoisLine(user, dest, 313, "%s %s :is %s %s on %s",user->nick.c_str(), dest->nick.c_str(), (strchr("AEIOUaeiou",dest->oper[0]) ? "an" : "a"),irc::Spacify(dest->oper.c_str()), ServerInstance->Config->Network);
|
||||
}
|
||||
|
||||
if (user == dest || user->HasPrivPermission("users/auspex"))
|
||||
|
@ -823,7 +823,7 @@ void ServerConfig::Read(bool bail, const std::string &useruid)
|
||||
{"disabled", "commands", "", new ValueContainerChar (this->DisabledCommands), DT_CHARPTR, NoValidation},
|
||||
{"disabled", "usermodes", "", new ValueContainerChar (disabledumodes), DT_CHARPTR, ValidateDisabledUModes},
|
||||
{"disabled", "chanmodes", "", new ValueContainerChar (disabledcmodes), DT_CHARPTR, ValidateDisabledCModes},
|
||||
{"disabled", "fakenonexistant", "0", new ValueContainerBool (&this->DisabledDontExist), DT_BOOLEAN, NoValidation},
|
||||
{"disabled", "fakenonexistant", "0", new ValueContainerBool (&this->DisabledDontExist), DT_BOOLEAN, NoValidation},
|
||||
|
||||
{"security", "runasuser", "", new ValueContainerChar(this->SetUser), DT_CHARPTR, NoValidation},
|
||||
{"security", "runasgroup", "", new ValueContainerChar(this->SetGroup), DT_CHARPTR, NoValidation},
|
||||
@ -834,7 +834,8 @@ void ServerConfig::Read(bool bail, const std::string &useruid)
|
||||
{"security", "hidewhois", "", new ValueContainerChar (this->HideWhoisServer), DT_NOSPACES, NoValidation},
|
||||
{"security", "hidekills", "", new ValueContainerChar (this->HideKillsServer), DT_NOSPACES, NoValidation},
|
||||
{"security", "operspywhois", "0", new ValueContainerBool (&this->OperSpyWhois), DT_BOOLEAN, NoValidation},
|
||||
{"security", "restrictbannedusers", "1", new ValueContainerBool (&this->RestrictBannedUsers), DT_BOOLEAN, NoValidation},
|
||||
{"security", "restrictbannedusers", "1", new ValueContainerBool (&this->RestrictBannedUsers), DT_BOOLEAN, NoValidation},
|
||||
{"security", "genericoper", "0", new ValueContainerBool (&this->GenericOper), DT_BOOLEAN, NoValidation},
|
||||
{"performance", "nouserdns", "0", new ValueContainerBool (&this->NoUserDns), DT_BOOLEAN, NoValidation},
|
||||
{"options", "syntaxhints", "0", new ValueContainerBool (&this->SyntaxHints), DT_BOOLEAN, NoValidation},
|
||||
{"options", "cyclehosts", "0", new ValueContainerBool (&this->CycleHosts), DT_BOOLEAN, NoValidation},
|
||||
|
Loading…
x
Reference in New Issue
Block a user