added .gitignore
[NeonServV5.git] / WHOHandler.c
index c87ef409bdd5038f0ec329f8c0b47b409e0a6da3..38e0ce745b28a37281d953850816aa014318264a 100644 (file)
@@ -2,6 +2,8 @@
 #include "WHOHandler.h"
 #include "ChanNode.h"
 #include "UserNode.h"
+#include "ChanUser.h"
+#include "ClientSocket.h"
 
 #define WHOQUEUETYPE_ISONQUEUE 0x01
 #define WHOQUEUETYPE_USERLIST  0x02
@@ -130,3 +132,13 @@ void recv_whohandler_315(struct ClientSocket *client, char **argv, unsigned int
     }
     free(entry);
 }
+
+void free_whoqueue() {
+    struct WHOQueueEntry *entry, *next;
+    for(entry = first_entry; entry; entry = next) {
+        next = entry->next;
+        free(entry);
+    }
+    first_entry = NULL;
+    last_entry = NULL;
+}