removed unused code in bots.c
[NeonServV5.git] / src / ClientSocket.c
index a1a5726a567eef6c33ad81e043010276e1329c16..eaf43d46991b213ebc1021de875f21bfa74e53c1 100644 (file)
@@ -1,4 +1,4 @@
-/* ClientSocket.c - NeonServ v5.5
+/* ClientSocket.c - NeonServ v5.6
  * Copyright (C) 2011-2012  Philipp Kreil (pk910)
  * 
  * This program is free software: you can redistribute it and/or modify
@@ -24,6 +24,7 @@
 #include "ConfigParser.h"
 #include "version.h"
 #include "IOHandler.h"
+#include "IRCEvents.h"
 
 struct socket_list {
     struct ClientSocket *data;
@@ -136,6 +137,7 @@ int destroy_socket(struct ClientSocket *client) {
         } else
             last_sock = sock;
     }
+    event_freeclient(client);
     free(client->host);
     if(client->bind)
         free(client->bind);
@@ -217,7 +219,9 @@ int clientsocket_parseorder_top(unsigned int tid) {
 
 static IOHANDLER_CALLBACK(socket_callback) {
     struct ClientSocket *client = event->iofd->data;
+    #ifdef HAVE_THREADS
     unsigned int tid;
+    #endif
     switch(event->type) {
     case IOEVENT_CONNECTED:
         client->flags |= SOCKET_FLAG_CONNECTED;