summaryrefslogtreecommitdiff
path: root/functions.h
diff options
context:
space:
mode:
Diffstat (limited to 'functions.h')
-rw-r--r--functions.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/functions.h b/functions.h
index cba1d72..91ce35f 100644
--- a/functions.h
+++ b/functions.h
@@ -36,11 +36,6 @@
#include "structures.h"
#include "replay.h"
-#define MAXDATASIZE 513 // Maximum number of bytes we can get at once (RFC2812 says 512, plus one for null terminator)
-#define MAXCLIENTS 32 // Maximum number of clients that can connect to the bouncer at a time
-#define MAXCHANNELS 1024 // Let's assume 1024 is reasonable for now (it's configured per IRCd)
-#define MAXRFCNICKLEN 9 // From RFC 1459
-
// getstdin() return codes
#define OK 0
#define NO_INPUT 1
@@ -50,6 +45,13 @@
#define DEBUG_SOME 1
#define DEBUG_FULL 2
+#define EXCEPT_NONE 0
+
+#define MAXDATASIZE 513 // Maximum number of bytes we can get at once (RFC2812 says 512, plus one for null terminator)
+#define MAXCLIENTS 32 // Maximum number of clients that can connect to the bouncer at a time
+#define MAXCHANNELS 1024 // Let's assume 1024 is reasonable for now (it's configured per IRCd)
+#define MAXRFCNICKLEN 9 // From RFC 1459
+
// Write debug string to file.
// Debug level is provided by level, set to one of DEBUG_CRIT, DEBUG_SOME or DEBUG_FULL.
// Debug is only written if the global int "debug" is greater than or equal to the level.
@@ -144,4 +146,9 @@ int joinautochannels(SSL *server_ssl, struct client *clients, struct settings *s
// 1 through to 9.
void tryautonick(struct ircdstrings *ircdstrings);
+// Exit the program cleanly - tell clients, tell the server, then exit(0)
+// Optional quit message string "quitmsg"
+// "sourcefd" of 0 means the request didn't come from a client
+void cleanexit(SSL *server_ssl, struct client *clients, int sourcefd, struct ircdstrings *ircdstrings, struct settings *settings, char *quitmsg);
+
#endif