X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2FClientSocket.h;h=45cf06d9499e69d53cd18addb969bb3f103a39ba;hb=c575e458c6257e75b97884847143b20965a5dfda;hp=1554e529f60317f813322f02983c1c22a745fe03;hpb=95fed4deda0319bee515e44ceec0c77061a2c04e;p=NeonServV5.git diff --git a/src/ClientSocket.h b/src/ClientSocket.h index 1554e52..45cf06d 100644 --- a/src/ClientSocket.h +++ b/src/ClientSocket.h @@ -1,4 +1,4 @@ -/* ClientSocket.h - NeonServ v5.0 +/* ClientSocket.h - NeonServ v5.2 * Copyright (C) 2011 Philipp Kreil (pk910) * * This program is free software: you can redistribute it and/or modify @@ -22,7 +22,9 @@ #define SOCKET_FLAG_DEAD 0x01 #define SOCKET_FLAG_CONNECTED 0x02 #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_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 BUF_SIZ 512 @@ -41,6 +43,8 @@ struct ClientSocket { unsigned long traffic_in; unsigned long traffic_out; time_t connection_time; + + struct BotQueue *queue; int botid : 16; int clientid : 16; @@ -51,6 +55,7 @@ struct ClientSocket { struct ClientSocket* create_socket(char *host, int port, char *pass, struct UserNode *user); int connect_socket(struct ClientSocket *client); int close_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); void putsock(struct ClientSocket *client, const char *text, ...) PRINTF_LIKE(2, 3);