X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fircd_client.c;h=001548ebae5408424a74621694ada982993131ea;hb=4e79b9632a41b2c7d2fecb4e4514692f9cf7e7f9;hp=28d650baea1def84998d0c7293526d67d04f91e5;hpb=59ddec51d649f0af9b91d2aab710258d5b97a596;p=NextIRCd.git diff --git a/src/ircd_client.c b/src/ircd_client.c index 28d650b..001548e 100644 --- a/src/ircd_client.c +++ b/src/ircd_client.c @@ -18,16 +18,21 @@ #include "ircd_client.h" #include "ircd_sock.h" #include "struct_connection.h" +#include "struct_client.h" #include "struct_auth.h" #include "ircd_config.h" -#include "version.h" #include #include #include #define CLIENT_MAXLEN 512 -static void client_printf(struct Connection *conn, const char *text, ...) { +struct Client *client_connected(struct Auth *auth) { + + return NULL; +} + +void client_printf(struct Client *client, const char *text, ...) { va_list arg_list; char sendBuf[CLIENT_MAXLEN]; int pos; @@ -38,19 +43,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+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? */ + socket_send(client->conn, sendBuf, pos+1); } -void client_disconnected(struct Connection *conn) { - +void client_exit(struct Client *client, char *reason) { + if(client->conn) { + + } + }