completely rebuild WHOHander ticket management
[NeonServV5.git] / src / ClientSocket.c
index 87871b849bf0b75fcf143beadb68053a1f311d14..5e790dac4e3b2de07d61dc3f15057f6d6fe7ea5e 100644 (file)
@@ -1,4 +1,4 @@
-/* ClientSocket.c - NeonServ v5.1
+/* ClientSocket.c - NeonServ v5.2
  * Copyright (C) 2011  Philipp Kreil (pk910)
  * 
  * This program is free software: you can redistribute it and/or modify
@@ -19,6 +19,7 @@
 #include "IRCParser.h"
 #include "UserNode.h"
 #include "IRCQueue.h"
+#include "WHOHandler.h"
 
 struct socket_list {
     struct ClientSocket *data;
@@ -61,6 +62,8 @@ struct ClientSocket* create_socket(char *host, int port, char *pass, struct User
        client->botid = 0;
     client->clientid = 0;
     client->queue = NULL;
+    client->whoqueue_first = NULL;
+    client->whoqueue_last = NULL;
     client->next = sockets->data;
     sockets->data = client;
     return client;
@@ -189,6 +192,8 @@ int close_socket(struct ClientSocket *client) {
     }
     if(client->queue)
         queue_destroy(client);
+    if(client->whoqueue_first)
+        clear_whoqueue(client);
     free(client->host);
     free(client->pass);
     free(client);