summaryrefslogtreecommitdiff
path: root/functions.h
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-06-10 21:17:10 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-06-10 21:17:10 +0100
commitc84d8c493ccdc840a866a9f51f10fe6b1f2bc377 (patch)
treeb064e1f554b19378beb0909c78061001b331eb3a /functions.h
parent853efa64ff8ad6ebde47d1265f8b13e954a0d2f0 (diff)
Refactoring - split giant processircmessage() switch statement into separate server and client functions in message.h/message.c.
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