diff options
Diffstat (limited to 'message.h')
-rw-r--r-- | message.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/message.h b/message.h new file mode 100644 index 0000000..349a764 --- /dev/null +++ b/message.h @@ -0,0 +1,37 @@ +/* + * This file is part of blabouncer (https://www.blatech.co.uk/l_bratch/blabouncer). + * Copyright (C) 2019 Luke Bratch <luke@bratch.co.uk>. + * + * Blabouncer is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 3. + * + * Blabouncer is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with blabouncer. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef MESSAGE_H_INCLUDED +#define MESSAGE_H_INCLUDED + +#include "functions.h" +#include "config.h" +#include "logging.h" + +#define MAXTOKENS 100 // maximum number of (CRLF or space) separated tokens per server response we expect (TODO - check this is reasonable) (CRLF and spaces just grouped here due to laziness) + +// Process an IRC message that came from the real server. +// Return 1 if we processed it, or 0 if we didn't. +int processservermessage(SSL *server_ssl, char *str, struct client *clients, int sourcefd, struct ircdstrings *ircdstrings, + struct channel *channels, struct settings *settings, char tokens[MAXTOKENS][MAXDATASIZE], int counter); + +// Process an IRC message that came from a client. +// Return 1 if we processed it, or 0 if we didn't. +int processclientmessage(SSL *server_ssl, char *str, struct client *clients, int sourcefd, struct ircdstrings *ircdstrings, + struct channel *channels, struct settings *settings, char tokens[MAXTOKENS][MAXDATASIZE], int counter); + +#endif |