summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
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