InspIRCd
2.0
|
#include <configreader.h>
Public Types | |
enum | InviteAnnounceState { INVITE_ANNOUNCE_NONE, INVITE_ANNOUNCE_ALL, INVITE_ANNOUNCE_OPS, INVITE_ANNOUNCE_DYNAMIC } |
enum | OperSpyWhoisState { SPYWHOIS_NONE, SPYWHOIS_SINGLEMSG, SPYWHOIS_SPLITMSG } |
Public Member Functions | |
ConfigTag * | ConfValue (const std::string &tag) |
ConfigTagList | ConfTags (const std::string &tag) |
ServerConfig () | |
const std::string & | GetSID () |
void | Update005 () |
void | Send005 (User *user) |
void | Read () |
void | Apply (ServerConfig *old, const std::string &useruid) |
void | ApplyModules (User *user) |
void | Fill () |
bool | StartsWithWindowsDriveLetter (const std::string &path) |
bool | ApplyDisabledCommands (const std::string &data) |
Static Public Member Functions | |
static const char * | CleanFilename (const char *name) |
static bool | FileExists (const char *file) |
This class holds the bulk of the runtime configuration for the ircd. It allows for reading new config values, accessing configuration files, and storage of the configuration data needed to run the ircd, such as the servername, connect classes, /ADMIN data, MOTDs and filenames etc.
Used to indicate who we announce invites to on a channel
ServerConfig::ServerConfig | ( | ) |
Construct a new ServerConfig
void ServerConfig::Apply | ( | ServerConfig * | old, |
const std::string & | useruid | ||
) |
Apply configuration changes from the old configuration.
|
static |
Clean a filename, stripping the directories (and drives) from string.
name | Directory to tidy |
ConfigTag * ServerConfig::ConfValue | ( | const std::string & | tag | ) |
Get a configuration tag
tag | The name of the tag to get |
|
static |
Check if a file exists.
file | The full path to a file |
const std::string & ServerConfig::GetSID | ( | ) |
Get server ID as string with required leading zeroes
void ServerConfig::Read | ( | ) |
Read the entire configuration into memory and initialize this class. All other methods should be used only by the core.
void ServerConfig::Send005 | ( | User * | user | ) |
Send the 005 numerics (ISUPPORT) to a user
bool ServerConfig::StartsWithWindowsDriveLetter | ( | const std::string & | path | ) |
Returns true if the given string starts with a windows drive letter
void ServerConfig::Update005 | ( | ) |
Update the 005 vector
std::string ServerConfig::AdminEmail |
Holds the email address of the admin, for output in the /ADMIN command.
std::string ServerConfig::AdminName |
Holds the admin's name, for output in the /ADMIN command.
std::string ServerConfig::AdminNick |
Holds the admin's nickname, for output in the /ADMIN command
InviteAnnounceState ServerConfig::AnnounceInvites |
Announce invites to the channel with a server notice
int ServerConfig::c_ipv4_range |
Clones CIDR range for ipv4 (0-32) Defaults to 32 (checks clones on all IPs seperately)
int ServerConfig::c_ipv6_range |
Clones CIDR range for ipv6 (0-128) Defaults to 128 (checks on all IPs seperately)
ClassVector ServerConfig::Classes |
The connect classes in use by the IRC server.
CommandLineConf ServerConfig::cmdline |
Configuration parsed from the command line.
ConfigDataHash ServerConfig::config_data |
This holds all the information in the config file, it's indexed by tag name to a vector of key/values.
std::string ServerConfig::CustomVersion |
Custom version string, which if defined can replace the system info in VERSION.
bool ServerConfig::CycleHosts |
If set to true, users appear to quit then rejoin when their hosts change. This keeps clients synchronized properly.
bool ServerConfig::CycleHostsFromUser |
If set to true, the CycleHosts mode change will be sourced from the user, rather than the server
std::string ServerConfig::data005 |
The 005 tokens of this server (ISUPPORT) populated/repopulated upon loading or unloading modules.
std::string ServerConfig::DefaultModes |
Default channel modes
std::string ServerConfig::diepass |
The admin-configured /DIE password
char ServerConfig::DisabledCModes[64] |
This variable identifies which chanmodes have been disabled.
std::string ServerConfig::DisabledCommands |
This variable contains a space-seperated list of commands which are disabled by the administrator of the server for non-opers.
bool ServerConfig::DisabledDontExist |
Pretend disabled commands don't exist.
char ServerConfig::DisabledUModes[64] |
This variable identifies which usermodes have been diabled.
int ServerConfig::dns_timeout |
The number of seconds the DNS subsystem will wait before timing out any request.
ConfigTag* ServerConfig::EmptyTag |
An empty configuration tag.
std::stringstream ServerConfig::errstr |
Error stream, contains error output from any failed configuration parsing.
ConfigFileCache ServerConfig::Files |
This holds all extra files that have been read in the configuration (for example, MOTD and RULES files are stored here)
std::string ServerConfig::FixedPart |
The fixed part message in use, or an empty string
std::string ServerConfig::FixedQuit |
The fixed quit message in use, or an empty string
bool ServerConfig::FullHostInTopic |
If set to true, the full [email protected] will be shown in the TOPIC command for who set the topic last. If false, only the nick is shown.
bool ServerConfig::GenericOper |
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 ServerConfig::HideBans |
True if we're going to hide ban reasons for non-opers (e.g. G-Lines, K-Lines, Z-Lines)
std::string ServerConfig::HideKillsServer |
Set to a non empty string to obfuscate nicknames prepended to a KILL.
bool ServerConfig::HideModeLists[256] |
If this is set to true, then mode lists (e.g MODE #chan b) are hidden from unprivileged users.
bool ServerConfig::HideSplits |
True if we're going to hide netsplits as *.net *.split for non-opers
bool ServerConfig::HideULineKills |
Set to hide kills from clients of ulined servers in snotices.
std::string ServerConfig::HideWhoisServer |
Set to a non-empty string to obfuscate the server name of users in WHOIS
bool ServerConfig::InvBypassModes |
If this value is true, invites will bypass more than just +i
std::vector<std::string> ServerConfig::isupport |
isupport strings
ServerLimits ServerConfig::Limits |
Length limits, see definition of ServerLimits class
std::map<std::string, int> ServerConfig::maxbans |
Max banlist sizes for channels (the std::string is a glob)
unsigned int ServerConfig::MaxChans |
Max channels per user
int ServerConfig::MaxConn |
The value to be used for listen() backlogs as default.
unsigned int ServerConfig::MaxTargets |
Maximum number of targets for a multi target command such as PRIVMSG or KICK
std::string ServerConfig::ModPath |
The full path to the modules directory. This is either set at compile time, or overridden in the configuration file via the <path> tag.
std::string ServerConfig::MoronBanner |
Notice to give to users when they are Xlined
std::string ServerConfig::motd |
The pathname and filename of the message of the day file, as defined by the administrator.
int ServerConfig::NetBufferSize |
The size of the read() buffer in the user handling code, used to read data into a user's recvQ.
bool ServerConfig::NoSnoticeStack |
If this value is true, snotices will not stack when repeats are sent
bool ServerConfig::NoUserDns |
If set to true, no user DNS lookups are to be performed
OperIndex ServerConfig::oper_blocks |
Oper block and type index. For anonymous oper blocks (type only), prefix with a space.
unsigned int ServerConfig::OperMaxChans |
Oper max channels per user
OperSpyWhoisState ServerConfig::OperSpyWhois |
If this is enabled then operators will see invisible (+i) channels in /whois.
std::string ServerConfig::PID |
The full pathname and filename of the PID file as defined in the configuration.
std::string ServerConfig::powerhash |
The hash method for BOTH the die and restart passwords.
std::string ServerConfig::PrefixPart |
The part prefix in use, or an empty string
std::string ServerConfig::PrefixQuit |
The quit prefix in use, or an empty string
bool ServerConfig::RawLog |
True if raw I/O is being logged
std::string ServerConfig::restartpass |
The admin-configured /RESTART password
bool ServerConfig::RestrictBannedUsers |
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.
std::string ServerConfig::rules |
The pathname and filename of the rules file, as defined by the administrator.
std::string ServerConfig::ServerDesc |
Holds the description of the local server as defined by the administrator.
std::string ServerConfig::ServerName |
Holds the server name of the local server as defined by the administrator.
std::string ServerConfig::sid |
TS6-like server ID. NOTE: 000...999 are usable for InspIRCd servers. This makes code simpler. 0AA, 1BB etc with letters are reserved for services use.
unsigned int ServerConfig::SoftLimit |
The soft limit value assigned to the irc server. The IRC server will not allow more than this number of local users.
std::string ServerConfig::SuffixPart |
The part suffix in use, or an empty string
std::string ServerConfig::SuffixQuit |
The quit suffix in use, or an empty string
bool ServerConfig::SyntaxHints |
If set to true, provide syntax hints for unknown commands
std::map<irc::string, bool> ServerConfig::ulines |
List of u-lined servers
bool ServerConfig::UndernetMsgPrefix |
If set to true, prefixed channel NOTICEs and PRIVMSGs will have the prefix added to the outgoing text for undernet style msg prefixing.
std::string ServerConfig::UserStats |
STATS characters in this list are available only to operators.
bool ServerConfig::valid |
True if this configuration is valid enough to run with
bool ServerConfig::WelcomeNotice |
If true, a "Welcome to <networkname>!" NOTICE will be sent to connecting users
int ServerConfig::WhoWasGroupSize |
Max number of WhoWas entries per user.
int ServerConfig::WhoWasMaxGroups |
Max number of cumulative user-entries in WhoWas. When max reached and added to, push out oldest entry FIFO style.
int ServerConfig::WhoWasMaxKeep |
Max seconds a user is kept in WhoWas before being pruned.
bool ServerConfig::WildcardIPv6 |
Bind to IPv6 by default