X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2FClientSocket.h;h=7ede0c325e79b46e9c3302ef50887c7d14f96a37;hb=391260f64a1dfb35bf0a55e7044fe1b8d83f2561;hp=7926767c973b0135b6077c2cc1f3938e8ee2884b;hpb=c254e7d9a1622b19aae9b4ebecb4082657288f4a;p=NeonServV5.git diff --git a/src/ClientSocket.h b/src/ClientSocket.h index 7926767..7ede0c3 100644 --- a/src/ClientSocket.h +++ b/src/ClientSocket.h @@ -1,4 +1,4 @@ -/* ClientSocket.h - NeonServ v5.1 +/* ClientSocket.h - NeonServ v5.2 * Copyright (C) 2011 Philipp Kreil (pk910) * * This program is free software: you can redistribute it and/or modify @@ -24,11 +24,15 @@ #define SOCKET_FLAG_READY 0x04 #define SOCKET_FLAG_PREFERRED 0x08 /* prefered bot to send datas to the IRC World (NOTICE's WHO's etc pp) */ #define SOCKET_FLAG_USE_QUEUE 0x10 +#define SOCKET_FLAG_RECONNECT 0x20 +#define SOCKET_FLAG_SSL 0x40 +#define SOCKET_FLAG_HAVE_SSL 0x80 #define BUF_SIZ 512 struct UserNode; struct trigger_cache; +struct SSLConnection; struct ClientSocket { int sock; @@ -37,13 +41,24 @@ struct ClientSocket { unsigned int bufferpos; char *host; int port; + char *bind; char *pass; + char *nick; + char *ident; + char *realname; struct UserNode *user; unsigned long traffic_in; unsigned long traffic_out; time_t connection_time; + struct SSLConnection *sslconn; struct BotQueue *queue; + + struct WHOQueueEntry *whoqueue_first; + struct WHOQueueEntry *whoqueue_last; + + struct HandleInfoQueueEntry *handleinfo_first; + struct HandleInfoQueueEntry *handleinfo_last; int botid : 16; int clientid : 16; @@ -51,7 +66,7 @@ struct ClientSocket { struct ClientSocket *next; }; -struct ClientSocket* create_socket(char *host, int port, char *pass, struct UserNode *user); +struct ClientSocket* create_socket(char *host, int port, char *bindto, char *pass, char *nick, char *ident, char *realname); int connect_socket(struct ClientSocket *client); int close_socket(struct ClientSocket *client); int write_socket_force(struct ClientSocket *client, char* msg, int len);