#include "struct_connection.h"
#include "struct_auth.h"
#include "ircd_config.h"
-#include "version.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#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;
if (pos < 0 || pos > (CLIENT_MAXLEN - 2)) pos = CLIENT_MAXLEN - 2;
sendBuf[pos] = '\n';
sendBuf[pos+1] = '\0';
- socket_send(conn, sendBuf, pos+1);
+ 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) {
+
+ }
+
}