X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fircd_client.c;h=088d4c4da24700ad4d9873478977d1b016d04c3e;hb=b71e2c21fa000761fa80d66597f880496d9f45f2;hp=3ae6e50e0697c9475ef28fbd1659baba67bcfb23;hpb=1c8cbecb4836bafd86885d96cf59e204160927cb;p=NextIRCd.git diff --git a/src/ircd_client.c b/src/ircd_client.c index 3ae6e50..088d4c4 100644 --- a/src/ircd_client.c +++ b/src/ircd_client.c @@ -19,15 +19,18 @@ #include "ircd_sock.h" #include "struct_connection.h" #include "struct_auth.h" -#include "config.h" -#include "version.h" +#include "ircd_config.h" #include #include #include #define CLIENT_MAXLEN 512 -static void client_printf(struct Connection *conn, const char *text, ...) { +void client_connected(struct Auth *auth) { + +} + +void client_printf(struct Client *client, const char *text, ...) { va_list arg_list; char sendBuf[CLIENT_MAXLEN]; int pos; @@ -38,23 +41,12 @@ static void client_printf(struct Connection *conn, const char *text, ...) { if (pos < 0 || pos > (CLIENT_MAXLEN - 2)) pos = CLIENT_MAXLEN - 2; sendBuf[pos] = '\n'; sendBuf[pos+1] = '\0'; - socket_send(conn, sendBuf, pos); + socket_send(client->conn, sendBuf, pos+1); } -void client_connected(struct Connection *conn) { - client_printf(conn, "NOTICE AUTH :*** NextIRCd v%d.%d (%s)", VERSION_NUMBER, patchlevel, revision); - - struct Auth *auth = calloc(1, sizeof(*auth)); - auth->conn = conn; - conn->data.auth = auth; - - /* maybe do some stuff here? */ -} - -void client_disconnected(struct Connection *conn) { - -} - -void client_recv(struct Connection *conn, char *line) { - +void client_exit(struct Client *client, char *reason) { + if(client->conn) { + + } + }