summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2003-02-07 21:15:27 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2003-02-07 21:15:27 +0000
commit014ac7aa42b1ad1c62fa15366bc8fc2b3ef97488 (patch)
treea6b613ea94aef9e46034e1bc66e3a319b6bcd460 /include
parenta83b933a88f2dd117d21c721490f32eb7da8cded (diff)
Changed to using LogLevels
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@163 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/connection.h4
-rw-r--r--include/globals.h2
-rw-r--r--include/inspircd.h9
-rw-r--r--include/modules.h17
4 files changed, 23 insertions, 9 deletions
diff --git a/include/connection.h b/include/connection.h
index 94b657288..763b17fb5 100644
--- a/include/connection.h
+++ b/include/connection.h
@@ -56,11 +56,11 @@ class connection : public classbase
time_t nping;
connection();
- bool CreateListener(char* host, int port);
+ bool CreateListener(char* host, int p);
bool BeginLink(char* targethost, int port, char* password);
void TerminateLink(char* targethost);
bool SendPacket(char *message, char* host, int port);
- bool RecvPacket(char *message, char* host, int &port);
+ bool RecvPacket(char *message, char* host, int &prt);
bool SendSYN(char* host, int port);
bool SendACK(char* host, int port, int reply_id);
long GenKey();
diff --git a/include/globals.h b/include/globals.h
index a640dfe9b..07c32303f 100644
--- a/include/globals.h
+++ b/include/globals.h
@@ -19,7 +19,7 @@
typedef deque<string> file_cache;
void WriteOpers(char* text, ...);
-void debug(char *text, ...);
+void log(int level, char *text, ...);
void Write(int sock,char *text, ...);
void WriteServ(int sock, char* text, ...);
void WriteFrom(int sock, userrec *user,char* text, ...);
diff --git a/include/inspircd.h b/include/inspircd.h
index 1e1582723..03a5e168e 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -38,9 +38,14 @@
#define TRUE 1
#define FALSE 0
#define IDENTMAX 9
-/* max sockets we can open */
#define MAXSOCKS 64
+#define DEBUG 10
+#define VERBOSE 20
+#define DEFAULT 30
+#define SPARSE 40
+#define NONE 50
+
typedef deque<string> file_cache;
/* prototypes */
@@ -52,7 +57,7 @@ void ReadConfig(void);
void strlower(char *n);
void WriteOpers(char* text, ...);
-void debug(char *text, ...);
+void log(int level, char *text, ...);
void Write(int sock,char *text, ...);
void WriteServ(int sock, char* text, ...);
void WriteFrom(int sock, userrec *user,char* text, ...);
diff --git a/include/modules.h b/include/modules.h
index c2896f4cb..9b750e599 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -90,6 +90,12 @@ class Module : public classbase
* and the details of the channel they have left is available in the variable chanrec *channel
*/
virtual void OnUserPart(userrec* user, chanrec* channel);
+
+
+ virtual void Module::OnPacketTransmit(char *p);
+ virtual void Module::OnPacketReceive(char *p);
+ virtual void OnRehash();
+
};
@@ -114,11 +120,11 @@ class Server : public classbase
* This method sends a server notice to all opers with the usermode +s.
*/
virtual void SendOpers(string s);
- /** Sends a debug string.
- * This method writes a line of text to the debug log. If debugging is disabled
- * in the configuration, this command has no effect.
+ /** Writes a log string.
+ * This method writes a line of text to the log. If the level given is lower than the
+ * level given in the configuration, this command has no effect.
*/
- virtual void Debug(string s);
+ virtual void Log(int level, string s);
/** Sends a line of text down a TCP/IP socket.
* This method writes a line of text to an established socket, cutting it to 510 characters
* plus a carriage return and linefeed if required.
@@ -305,4 +311,7 @@ class ModuleFactory : public classbase
virtual Module * CreateModule() = 0;
};
+
+typedef DLLFactory<ModuleFactory> ircd_module;
+
#endif