}
client->host = strdup(host);
client->port = port;
- printf("Connect: %s:%d", client->host, client->port);
+ printf("Connect: %s:%d\n", client->host, client->port);
client->pass = (pass == NULL ? NULL : strdup(pass));
client->user = user;
client->flags = 0;
char sendBuf[512];
int len;
- if(client->pass) {
+ if(client->pass && strcmp(client->pass, "")) {
len = sprintf(sendBuf, "PASS :%s\n", client->pass);
write_socket(client, sendBuf, len);
}