*push*
authorpk910 <philipp@zoelle1.de>
Wed, 10 Aug 2011 00:15:50 +0000 (02:15 +0200)
committerpk910 <philipp@zoelle1.de>
Wed, 10 Aug 2011 00:15:50 +0000 (02:15 +0200)
ClientSocket.c

index 34b9d4f2acd8fff4bd2e9696be532808007066b9..fbbee3345030d3695408379770851180ca6028ad 100644 (file)
@@ -72,6 +72,9 @@ int connect_socket(struct ClientSocket *client) {
         return 0;
     }
 
+    client->sock = sock;
+    client->flags |= SOCKET_FLAG_CONNECTED;
+
     //send the IRC Headers
     char sendBuf[512];
     int len;
@@ -85,8 +88,6 @@ int connect_socket(struct ClientSocket *client) {
     len = sprintf(sendBuf, "NICK %s\n", client->user->nick);
     write_socket(client, sendBuf, len);
 
-    client->sock = sock;
-    client->flags |= SOCKET_FLAG_CONNECTED;
     return 1;
 }