summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-14 10:23:14 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-14 10:23:14 +0000
commit44d3b5b82626f627069033c7bf019d4b1564b21c (patch)
tree6ccd51977679bc15e9823baa5fcab80892eae1d4 /include
parentb70de5aa7840e8b43c9c5bdbeb0146ec1d5ea1a0 (diff)
Half way through updating to move a ton of extern confs into class ServerConfig
WILL NOT RUN ATM git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2392 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/inspircd.h21
-rw-r--r--include/inspircd_io.h64
2 files changed, 85 insertions, 0 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index a418cd305..3418d6ede 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -73,6 +73,27 @@
typedef std::deque<std::string> file_cache;
+class serverstats
+{
+ int statsAccept;
+ int statsRefused;
+ int statsUnknown;
+ int statsCollisions;
+ int statsDns;
+ int statsDnsGood;
+ int statsDnsBad;
+ int statsConnects;
+ int statsSent;
+ int statsRecv;
+
+ serverstats()
+ {
+ statsAccept = statsRefused = statsUnknown = 0;
+ statsCollisions = statsDns = statsDnsGood = 0;
+ statsDnsBad = statsConnects = statsSent = statsRecv = 0;
+ }
+};
+
typedef void (handlerfunc) (char**, int, userrec*);
/* prototypes */
diff --git a/include/inspircd_io.h b/include/inspircd_io.h
index fc10f7c32..16ed158ea 100644
--- a/include/inspircd_io.h
+++ b/include/inspircd_io.h
@@ -17,6 +17,70 @@
#include <sstream>
#include <string>
+class ServerConfig
+{
+ char ServerName[MAXBUF];
+ char Network[MAXBUF];
+ char ServerDesc[MAXBUF];
+ char AdminName[MAXBUF];
+ char AdminEmail[MAXBUF];
+ char AdminNick[MAXBUF];
+ char diepass[MAXBUF];
+ char restartpass[MAXBUF];
+ char motd[MAXBUF];
+ char rules[MAXBUF];
+ char PrefixQuit[MAXBUF];
+ char DieValue[MAXBUF];
+ char DNSServer[MAXBUF];
+ char ModPath[1024];
+ char MyExecutable[1024];
+ FILE *log_file;
+ bool nofork;
+ bool unlimitcore;
+ bool AllowHalfop;
+ int dns_timeout;
+ int NetBufferSize; // NetBufferSize used as the buffer size for all read() ops
+ int MaxConn; // size of accept() backlog (128 by default on *BSD)
+ unsigned int SoftLimit;
+ int MaxWhoResults;
+ int debugging;
+ int LogLevel;
+ int DieDelay;
+ char addrs[MAXBUF][255];
+
+ ServerConfig()
+ {
+ *ServerName = '\0';
+ *Network = '\0';
+ *ServerDesc = '\0';
+ *AdminName = '\0';
+ *AdminEmail = '\0';
+ *AdminNick = '\0';
+ *diepass = '\0';
+ *restartpass = '\0';
+ *motd = '\0';
+ *rules = '\0';
+ *PrefixQuit = '\0';
+ *DieValue = '\0';
+ *DNSServer = '\0';
+ *ModPath = '\0';
+ *MyExecutable = '\0';
+ log_file = NULL;
+ nofork = false;
+ unlimitcore = false;
+ AllowHalfop = true;
+ dns_timeout = 5;
+ NetBufferSize = 10240;
+ SoftLimit = MAXCLIENTS;
+ MaxConn = SOMAXCONN;
+ MaxWhoResults = 100;
+ debugging = 0;
+ LogLevel = DEFAULT;
+ DieDelay = 5;
+ }
+};
+
+
void Exit (int);
void Start (void);
int DaemonSeed (void);