summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-20 18:29:15 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-20 18:29:15 +0000
commit2be353eececbfb9ab811ac74134ed7437b641369 (patch)
treee245e1615bc98574d411645ee1b47e9b91e62293 /include
parenta4a6c0e8b084a11e95f466a933b8bc226089c113 (diff)
A few minor fixes, some copy constructor stuff, misnamed channelmanager constructor, add files to vc8 project, configreader tidyups
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9780 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/channelmanager.h5
-rw-r--r--include/configreader.h10
-rw-r--r--include/usermanager.h5
-rw-r--r--include/users.h4
4 files changed, 13 insertions, 11 deletions
diff --git a/include/channelmanager.h b/include/channelmanager.h
index a85cdea26..c19876859 100644
--- a/include/channelmanager.h
+++ b/include/channelmanager.h
@@ -14,14 +14,13 @@
#ifndef __CHANNELMANAGER_H
#define __CHANNELMANAGER_H
-class CoreExport ChannelManager : public classbase
+class CoreExport ChannelManager : public Extensible
{
private:
InspIRCd *ServerInstance;
public:
- UserManager(InspIRCd *Instance)
+ ChannelManager(InspIRCd *Instance) : ServerInstance(Instance)
{
- ServerInstance = Instance;
}
};
diff --git a/include/configreader.h b/include/configreader.h
index 86191fa6d..7fc60203d 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -53,6 +53,10 @@ enum ConfigDataType
DT_BOOTONLY = 256 /* Can only be set on startup, not on rehash */
};
+/** The maximum number of values in a core configuration tag. Can be increased if needed.
+ */
+#define MAX_VALUES_PER_TAG 18
+
/** Holds a config value, either string, integer or boolean.
* Callback functions receive one or more of these, either on
* their own as a reference, or in a reference to a deque of them.
@@ -193,11 +197,11 @@ struct MultiConfig
/** Tag name */
const char* tag;
/** One or more items within tag */
- const char* items[18];
+ const char* items[MAX_VALUES_PER_TAG];
/** One or more defaults for items within tags */
- const char* items_default[18];
+ const char* items_default[MAX_VALUES_PER_TAG];
/** One or more data types */
- int datatype[18];
+ int datatype[MAX_VALUES_PER_TAG];
/** Initialization function */
MultiNotify init_function;
/** Validation function */
diff --git a/include/usermanager.h b/include/usermanager.h
index 3a9e15150..6ec80c9db 100644
--- a/include/usermanager.h
+++ b/include/usermanager.h
@@ -19,7 +19,7 @@
/** A list of ip addresses cross referenced against clone counts */
typedef std::map<irc::string, unsigned int> clonemap;
-class CoreExport UserManager : public classbase
+class CoreExport UserManager : public Extensible
{
private:
InspIRCd *ServerInstance;
@@ -28,9 +28,8 @@ class CoreExport UserManager : public classbase
*/
clonemap local_clones;
public:
- UserManager(InspIRCd *Instance)
+ UserManager(InspIRCd *Instance) : ServerInstance(Instance)
{
- ServerInstance = Instance;
}
~UserManager()
diff --git a/include/users.h b/include/users.h
index 0d2bff012..f098500e3 100644
--- a/include/users.h
+++ b/include/users.h
@@ -143,7 +143,7 @@ public:
registration_timeout(source->registration_timeout), flood(source->flood), host(source->host),
pingtime(source->pingtime), pass(source->pass), hash(source->hash), threshold(source->threshold), sendqmax(source->sendqmax),
recvqmax(source->recvqmax), maxlocal(source->maxlocal), maxglobal(source->maxglobal), maxchans(source->maxchans),
- port(source->port), RefCount(0), disabled(false), limit(0)
+ port(source->port), RefCount(0), disabled(false), limit(source->limit)
{
}
@@ -191,7 +191,7 @@ public:
registration_timeout(source->registration_timeout), flood(source->flood), host(source->host),
pingtime(source->pingtime), pass(source->pass), hash(source->hash), threshold(source->threshold), sendqmax(source->sendqmax),
recvqmax(source->recvqmax), maxlocal(source->maxlocal), maxglobal(source->maxglobal), maxchans(source->maxchans),
- port(source->port), RefCount(0), disabled(false), limit(0)
+ port(source->port), RefCount(0), disabled(false), limit(source->limit)
{
}