24 #ifndef INSPIRCD_CONFIGREADER
25 #define INSPIRCD_CONFIGREADER
33 #include "socketengine.h"
39 std::vector<KeyVal> items;
41 const std::string tag;
42 const std::string src_name;
46 std::string getString(
const std::string& key,
const std::string& def =
"");
48 long getInt(
const std::string& key,
long def = 0);
50 double getFloat(
const std::string& key,
double def = 0);
52 bool getBool(
const std::string& key,
bool def =
false);
60 bool readString(
const std::string& key, std::string& value,
bool allow_newline =
false);
62 std::string getTagLocation();
64 inline const std::vector<KeyVal>& getItems()
const {
return items; }
67 static ConfigTag* create(
const std::string& Tag,
const std::string& file,
int line, std::vector<KeyVal>*& Items);
69 ConfigTag(
const std::string& Tag,
const std::string& file,
int line);
146 std::string startup_log;
152 std::set<std::string> AllowedOperCommands;
153 std::set<std::string> AllowedPrivs;
171 std::string getConfig(
const std::string& key);
174 inline const char* NameStr()
188 void CrossCheckOperClassType();
196 ConfigTag* ConfValue(
const std::string& tag);
198 ConfigTagList ConfTags(
const std::string& tag);
214 enum InviteAnnounceState { INVITE_ANNOUNCE_NONE, INVITE_ANNOUNCE_ALL, INVITE_ANNOUNCE_OPS, INVITE_ANNOUNCE_DYNAMIC };
215 enum OperSpyWhoisState { SPYWHOIS_NONE, SPYWHOIS_SINGLEMSG, SPYWHOIS_SPLITMSG };
355 char DisabledUModes[64];
359 char DisabledCModes[64];
383 bool HideModeLists[256];
541 const std::string& GetSID();
549 void Send005(
User* user);
559 void Apply(
ServerConfig* old,
const std::string &useruid);
560 void ApplyModules(
User* user);
566 bool StartsWithWindowsDriveLetter(
const std::string &path);
568 bool ApplyDisabledCommands(
const std::string& data);
574 static const char* CleanFilename(
const char* name);
580 static bool FileExists(
const char* file);
604 const std::string TheUserUID;
606 : Config(
new ServerConfig), done(
false), TheUserUID(useruid)
618 bool IsDone() {
return done; }
std::string HideKillsServer
Definition: configreader.h:439
std::string rules
Definition: configreader.h:313
std::string SuffixQuit
Definition: configreader.h:321
Definition: configreader.h:150
bool HideSplits
Definition: configreader.h:414
size_t MaxGecos
Definition: configreader.h:93
unsigned int MaxTargets
Definition: configreader.h:410
std::string PrefixQuit
Definition: configreader.h:317
int c_ipv4_range
Definition: configreader.h:238
std::string AdminName
Definition: configreader.h:281
CoreExport const char * Spacify(const char *n)
Definition: hashcomp.cpp:368
CommandLineConf cmdline
Definition: configreader.h:233
int WhoWasGroupSize
Definition: configreader.h:247
std::string ServerDesc
Definition: configreader.h:276
ServerLimits Limits
Definition: configreader.h:229
bool valid
Definition: configreader.h:208
std::stringstream errstr
Definition: configreader.h:205
Definition: configreader.h:600
std::string ModPath
Definition: configreader.h:366
Definition: configreader.h:107
int MaxConn
Definition: configreader.h:399
bool InvBypassModes
Definition: configreader.h:584
bool DisabledDontExist
Definition: configreader.h:345
bool CycleHosts
Definition: configreader.h:496
bool UndernetMsgPrefix
Definition: configreader.h:506
std::string AdminEmail
Definition: configreader.h:286
reference< ConfigTag > oper_block
Definition: configreader.h:162
std::string DefaultModes
Definition: configreader.h:471
bool TestSuite
Definition: configreader.h:136
Definition: threadengine.h:37
size_t IdentMax
Definition: configreader.h:85
OperSpyWhoisState OperSpyWhois
Definition: configreader.h:428
std::string motd
Definition: configreader.h:308
std::string SuffixPart
Definition: configreader.h:333
std::string powerhash
Definition: configreader.h:303
bool FullHostInTopic
Definition: configreader.h:511
Definition: configreader.h:76
std::map< irc::string, bool > ulines
Definition: configreader.h:479
bool NoSnoticeStack
Definition: configreader.h:588
bool RawLog
Definition: configreader.h:431
std::string PID
Definition: configreader.h:448
ConfigDataHash config_data
Definition: configreader.h:220
reference< ConfigTag > type_block
Definition: configreader.h:164
std::string ServerName
Definition: configreader.h:261
Definition: configreader.h:186
bool CycleHostsFromUser
Definition: configreader.h:501
std::string diepass
Definition: configreader.h:295
InviteAnnounceState AnnounceInvites
Definition: configreader.h:423
std::string sid
Definition: configreader.h:531
bool HideULineKills
Definition: configreader.h:443
ClassVector Classes
Definition: configreader.h:452
std::string UserStats
Definition: configreader.h:467
std::vector< reference< ConfigTag > > class_blocks
Definition: configreader.h:166
unsigned int SoftLimit
Definition: configreader.h:405
int WhoWasMaxKeep
Definition: configreader.h:256
std::string FixedPart
Definition: configreader.h:337
size_t MaxKick
Definition: configreader.h:91
std::string DisabledCommands
Definition: configreader.h:351
bool forcedebug
Definition: configreader.h:121
int c_ipv6_range
Definition: configreader.h:243
bool HideBans
Definition: configreader.h:419
std::bitset< 64 > AllowedChanModes
Definition: configreader.h:159
Definition: configreader.h:38
std::string PrefixPart
Definition: configreader.h:329
ConfigFileCache Files
Definition: configreader.h:225
int NetBufferSize
Definition: configreader.h:394
int WhoWasMaxGroups
Definition: configreader.h:252
bool WelcomeNotice
Definition: configreader.h:593
std::string HideWhoisServer
Definition: configreader.h:435
ConfigTag * EmptyTag
Definition: configreader.h:201
size_t MaxAway
Definition: configreader.h:95
std::string name
Definition: configreader.h:168
unsigned int MaxChans
Definition: configreader.h:520
bool WildcardIPv6
Definition: configreader.h:211
std::vector< std::string > isupport
Definition: configreader.h:462
bool SyntaxHints
Definition: configreader.h:491
std::string MoronBanner
Definition: configreader.h:265
std::bitset< 64 > AllowedUserModes
Definition: configreader.h:156
size_t MaxModes
Definition: configreader.h:83
std::string data005
Definition: configreader.h:458
bool nofork
Definition: configreader.h:113
char ** argv
Definition: configreader.h:144
std::string restartpass
Definition: configreader.h:299
bool writelog
Definition: configreader.h:131
bool RestrictBannedUsers
Definition: configreader.h:377
size_t MaxQuit
Definition: configreader.h:87
size_t MaxTopic
Definition: configreader.h:89
size_t ChanMax
Definition: configreader.h:81
int dns_timeout
Definition: configreader.h:388
std::string AdminNick
Definition: configreader.h:291
ServerLimits()
Definition: configreader.h:101
int argc
Definition: configreader.h:140
OperIndex oper_blocks
Definition: configreader.h:516
InviteAnnounceState
Definition: configreader.h:214
bool GenericOper
Definition: configreader.h:372
std::string FixedQuit
Definition: configreader.h:325
std::string DNSServer
Definition: configreader.h:341
unsigned int OperMaxChans
Definition: configreader.h:524
bool NoUserDns
Definition: configreader.h:487
std::string CustomVersion
Definition: configreader.h:475
size_t NickMax
Definition: configreader.h:79
std::map< std::string, int > maxbans
Definition: configreader.h:483