X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2FClientSocket.h;h=a9d9b4ba3508e5eb7c84348e68b4e582fed92622;hb=989cb8324ec8fe9caba511d89051552638dbc776;hp=1ef009c148471a8d3395c98a52a3c163ee962a78;hpb=003f6906aeb911cce26ee25b48a818d0d1c4aea5;p=NeonServV5.git diff --git a/src/ClientSocket.h b/src/ClientSocket.h index 1ef009c..a9d9b4b 100644 --- a/src/ClientSocket.h +++ b/src/ClientSocket.h @@ -1,5 +1,5 @@ -/* ClientSocket.h - NeonServ v5.2 - * Copyright (C) 2011 Philipp Kreil (pk910) +/* ClientSocket.h - NeonServ v5.3 + * Copyright (C) 2011-2012 Philipp Kreil (pk910) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,6 +26,13 @@ #define SOCKET_FLAG_USE_QUEUE 0x10 #define SOCKET_FLAG_RECONNECT 0x20 #define SOCKET_FLAG_SSL 0x40 +#define SOCKET_FLAG_HAVE_SSL 0x80 +#define SOCKET_FLAG_QUITTED 0x100 +#define SOCKET_FLAG_FAST_JUMP 0x200 + +#define SOCKET_HAVE_BOTCLASSVALUE1 0x10000000 +#define SOCKET_HAVE_BOTCLASSVALUE2 0x20000000 +#define SOCKET_HAVE_BOTCLASSVALUE3 0x40000000 #define BUF_SIZ 512 @@ -35,11 +42,12 @@ struct SSLConnection; struct ClientSocket { int sock; - unsigned char flags; + unsigned int flags; char buffer[BUF_SIZ*2]; //we need to store up to 2 full commands at once unsigned int bufferpos; char *host; int port; + char *bind; char *pass; char *nick; char *ident; @@ -61,12 +69,17 @@ struct ClientSocket { int botid : 16; int clientid : 16; + void *botclassvalue1; + void *botclassvalue2; + void *botclassvalue3; + struct ClientSocket *next; }; -struct ClientSocket* create_socket(char *host, int port, char *pass, char *nick, char *ident, char *realname); +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 disconnect_socket(struct ClientSocket *client); int write_socket_force(struct ClientSocket *client, char* msg, int len); int write_socket(struct ClientSocket *client, char* msg, int len); void socket_loop(int timeout_seconds);