changed Makefile; build all commands as an own file
[NeonServV5.git] / ClientSocket.h
index d15be26e866d94151cd342464d94125fd8b97c5e..380e051951522ebaef2a5f602f23e9c67e52f493 100644 (file)
@@ -6,7 +6,7 @@
 #define SOCKET_FLAG_DEAD      0x01
 #define SOCKET_FLAG_CONNECTED 0x02
 #define SOCKET_FLAG_READY     0x04
-#define SOCKET_FLAG_PREFERED  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 BUF_SIZ 512
 
@@ -22,8 +22,12 @@ struct ClientSocket {
     int port;
     char *pass;
     struct UserNode *user;
+    unsigned long traffic_in;
+    unsigned long traffic_out;
+    time_t connection_time;
        
-       int botid;
+       int botid : 16;
+    int clientid : 16;
     
     struct ClientSocket *next;
 };
@@ -35,5 +39,6 @@ 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);
 struct ClientSocket* getBots(int flags, struct ClientSocket* last_bot);
+void free_sockets();
 
 #endif
\ No newline at end of file