summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2003-02-09 12:49:00 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2003-02-09 12:49:00 +0000
commit08e384bb24398224856c44baa51b51977644de9d (patch)
tree15363f194893e4dc31b0de9fb509e52a32ad53b5 /include
parent1f487855a5097c65aaad4752df259b9a877ba364 (diff)
Documentation update, 09/02/03
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@167 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/base.h10
-rw-r--r--include/ctables.h28
-rw-r--r--include/servers.h40
3 files changed, 61 insertions, 17 deletions
diff --git a/include/base.h b/include/base.h
index c347aedb3..b0e264bac 100644
--- a/include/base.h
+++ b/include/base.h
@@ -8,12 +8,20 @@
#ifndef __BASE_H__
#define __BASE_H__
-
+
+
+/** The base class for all inspircd classes
+*/
class classbase
{
public:
+ /** Time that the object was instantiated (used for TS calculation etc)
+ */
time_t age;
+ /** Constructor,
+ * Sets the object's time
+ */
classbase() { age = time(NULL); }
~classbase() { }
};
diff --git a/include/ctables.h b/include/ctables.h
index e422e1661..5ca5e13b3 100644
--- a/include/ctables.h
+++ b/include/ctables.h
@@ -22,17 +22,29 @@
typedef void (handlerfunc) (char**, int, userrec*);
-/* a structure that defines a command */
-
+/** A structure that defines a command
+ */
class command_t : public classbase
{
public:
- char command[MAXBUF]; /* command name */
- handlerfunc *handler_function; /* handler function as in typedef */
- char flags_needed; /* user flags needed to execute the command or 0 */
- int min_params; /* minimum number of parameters command takes */
- long use_count; /* used by /stats m */
- long total_bytes; /* used by /stats m */
+ /** Command name
+ */
+ char command[MAXBUF];
+ /** Handler function as in typedef
+ */
+ handlerfunc *handler_function;
+ /** User flags needed to execute the command or 0
+ */
+ char flags_needed;
+ /** Minimum number of parameters command takes
+ */
+ int min_params;
+ /** used by /stats m
+ */
+ long use_count;
+ /** used by /stats m
+ */
+ long total_bytes;
};
#endif
diff --git a/include/servers.h b/include/servers.h
index fc271b37e..9ce3e744d 100644
--- a/include/servers.h
+++ b/include/servers.h
@@ -14,21 +14,45 @@
#define LINK_ACTIVE 1
#define LINK_INACTIVE 0
+/** A class that defines the local server or a remote server
+ */
class serverrec : public connection
{
private:
public:
- char name[MAXBUF]; // server name
- long pingtime; // last ping response (ms)
- long usercount_i; // invisible users on server
- long usercount; // non-invisible users on server
- long opercount; // opers on server
- int hops_away; // number of hops away (for quick access)
- long version; // ircd version
- bool jupiter; // is a JUPE server (faked to enforce a server ban)
+ /** server name
+ */
+ char name[MAXBUF];
+ /** last ping response (ms)
+ */
+ long pingtime;
+ /** invisible users on server
+ */
+ long usercount_i;
+ /** non-invisible users on server
+ */
+ long usercount;
+ /** opers on server
+ */
+ long opercount;
+ /** number of hops away (for quick access)
+ */
+ int hops_away;
+ /** ircd version
+ */
+ long version;
+ /** is a JUPE server (faked to enforce a server ban)
+ */
+ bool jupiter;
+ /** Constructor
+ */
serverrec();
+ /** Constructor which initialises some of the main variables
+ */
serverrec(char* n, long ver, bool jupe);
+ /** Destructor
+ */
~serverrec();
};