summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/configreader.h23
-rw-r--r--include/dns.h2
-rw-r--r--include/inspircd.h24
-rw-r--r--include/xline.h94
4 files changed, 9 insertions, 134 deletions
diff --git a/include/configreader.h b/include/configreader.h
index 402f984e8..3ec4ca826 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -124,6 +124,13 @@ class CoreExport ServerConfig
void CrossCheckConnectBlocks(ServerConfig* current);
public:
+
+ /** Get a configuration tag
+ * @param tag The name of the tag to get
+ * @param offset get the Nth occurance of the tag
+ */
+ ConfigTag* ConfValue(const std::string& tag, int offset = 0);
+
/** Error stream, contains error output from any failed configuration parsing.
*/
std::stringstream errstr;
@@ -134,10 +141,6 @@ class CoreExport ServerConfig
/** Used to indicate who we announce invites to on a channel */
enum InviteAnnounceState { INVITE_ANNOUNCE_NONE, INVITE_ANNOUNCE_ALL, INVITE_ANNOUNCE_OPS, INVITE_ANNOUNCE_DYNAMIC };
- /** Not used any more as it is named, can probably be removed or renamed.
- */
- int DoDownloads();
-
/** This holds all the information in the config file,
* it's indexed by tag name to a vector of key/values.
*/
@@ -565,18 +568,6 @@ class CoreExport ServerConfig
*/
bool StartsWithWindowsDriveLetter(const std::string &path);
- /** Load 'filename' into 'target', with the new config parser everything is parsed into
- * tag/key/value at load-time rather than at read-value time.
- */
- bool LoadConf(FILE* &conf, const char* filename, bool allowexeinc);
-
- /** Load 'filename' into 'target', with the new config parser everything is parsed into
- * tag/key/value at load-time rather than at read-value time.
- */
- bool LoadConf(FILE* &conf, const std::string &filename, bool allowexeinc);
-
- ConfigTag* ConfValue(const std::string& tag, int offset = 0);
-
bool ApplyDisabledCommands(const std::string& data);
/** Clean a filename, stripping the directories (and drives) from string.
diff --git a/include/dns.h b/include/dns.h
index eeaad4ef8..e2f151d61 100644
--- a/include/dns.h
+++ b/include/dns.h
@@ -251,7 +251,7 @@ class CoreExport Resolver
* whilst lookups are in progress, they can be safely removed and your module will not
* crash the server.
*/
- Resolver(const std::string &source, QueryType qt, bool &cached, Module* creator = NULL);
+ Resolver(const std::string &source, QueryType qt, bool &cached, Module* creator);
/**
* The default destructor does nothing.
diff --git a/include/inspircd.h b/include/inspircd.h
index f185104ae..b4f73d571 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -179,29 +179,7 @@ template<typename T> inline long ConvToInt(const T &in)
{
std::stringstream tmp;
if (!(tmp << in)) return 0;
- return atoi(tmp.str().c_str());
-}
-
-/** Template function to convert integer to char, storing result in *res and
- * also returning the pointer to res. Based on Stuart Lowe's C/C++ Pages.
- * @param T input value
- * @param V result value
- * @param R base to convert to
- */
-template<typename T, typename V, typename R> inline char* itoa(const T &in, V *res, R base)
-{
- if (base < 2 || base > 16) { *res = 0; return res; }
- char* out = res;
- int quotient = in;
- while (quotient) {
- *out = "0123456789abcdef"[ std::abs( quotient % base ) ];
- ++out;
- quotient /= base;
- }
- if ( in < 0 && base == 10) *out++ = '-';
- std::reverse( res, out );
- *out = 0;
- return res;
+ return atol(tmp.str().c_str());
}
/** This class contains various STATS counters
diff --git a/include/xline.h b/include/xline.h
index e349c28d7..4ad1c63be 100644
--- a/include/xline.h
+++ b/include/xline.h
@@ -406,12 +406,6 @@ class CoreExport XLineFactory
*/
class ServerConfig;
-class GLineFactory;
-class ELineFactory;
-class QLineFactory;
-class ZLineFactory;
-class KLineFactory;
-
/** A map of xline factories
*/
typedef std::map<std::string, XLineFactory*> XLineFactMap;
@@ -447,16 +441,6 @@ class CoreExport XLineManager
*/
XLineFactMap line_factory;
- /** Core xline factories for G/E/K/Q/Z lines
- * (These generate GLine, ELine, KLine, QLine and ZLine
- * respectively)
- */
- GLineFactory* GFact;
- ELineFactory* EFact;
- KLineFactory* KFact;
- QLineFactory* QFact;
- ZLineFactory* ZFact;
-
/** Container of all lines, this is a map of maps which
* allows for fast lookup for add/remove of a line, and
* the shortest possible timed O(n) for checking a user
@@ -577,82 +561,4 @@ class CoreExport XLineManager
void InvokeStats(const std::string &type, int numeric, User* user, string_list &results);
};
-/** An XLineFactory specialized to generate GLine* pointers
- */
-class CoreExport GLineFactory : public XLineFactory
-{
- public:
- GLineFactory() : XLineFactory("G") { }
-
- /** Generate a GLine
- */
- XLine* Generate(time_t set_time, long duration, std::string source, std::string reason, std::string xline_specific_mask)
- {
- IdentHostPair ih = ServerInstance->XLines->IdentSplit(xline_specific_mask);
- return new GLine(set_time, duration, source, reason, ih.first, ih.second);
- }
-};
-
-/** An XLineFactory specialized to generate ELine* pointers
- */
-class CoreExport ELineFactory : public XLineFactory
-{
- public:
- ELineFactory() : XLineFactory("E") { }
-
- /** Generate an ELine
- */
- XLine* Generate(time_t set_time, long duration, std::string source, std::string reason, std::string xline_specific_mask)
- {
- IdentHostPair ih = ServerInstance->XLines->IdentSplit(xline_specific_mask);
- return new ELine(set_time, duration, source, reason, ih.first, ih.second);
- }
-};
-
-/** An XLineFactory specialized to generate KLine* pointers
- */
-class CoreExport KLineFactory : public XLineFactory
-{
- public:
- KLineFactory() : XLineFactory("K") { }
-
- /** Generate a KLine
- */
- XLine* Generate(time_t set_time, long duration, std::string source, std::string reason, std::string xline_specific_mask)
- {
- IdentHostPair ih = ServerInstance->XLines->IdentSplit(xline_specific_mask);
- return new KLine(set_time, duration, source, reason, ih.first, ih.second);
- }
-};
-
-/** An XLineFactory specialized to generate QLine* pointers
- */
-class CoreExport QLineFactory : public XLineFactory
-{
- public:
- QLineFactory() : XLineFactory("Q") { }
-
- /** Generate a QLine
- */
- XLine* Generate(time_t set_time, long duration, std::string source, std::string reason, std::string xline_specific_mask)
- {
- return new QLine(set_time, duration, source, reason, xline_specific_mask);
- }
-};
-
-/** An XLineFactory specialized to generate ZLine* pointers
- */
-class CoreExport ZLineFactory : public XLineFactory
-{
- public:
- ZLineFactory() : XLineFactory("Z") { }
-
- /** Generate a ZLine
- */
- XLine* Generate(time_t set_time, long duration, std::string source, std::string reason, std::string xline_specific_mask)
- {
- return new ZLine(set_time, duration, source, reason, xline_specific_mask);
- }
-};
-
#endif