Socket or send() problem?

I posted another topic about needing to Multithread, and I got that workin' all fine and dandy, but now it seems that my socket is buggin' out.

Problem:
I'm connecting to an IRC server and trying to send/recieve whatever data that I need, but my send is acting kind of funny. Upon connecting to the server, I recieve the first message fine:

:irc.XXX.com NOTICE AUTH :*** Found your hostname

Therefore my recv is working just fine. But I then try to send the USER and NICK command to the IRC server (which should produce a crapload of messages from the server), but it doesn't seem to be going through. I know its not sending because my friend is hosting the IRC server, and can detect when someone sends the USER and NICK commands, and he is getting nothing when I supposively send. I am getting no response from the server when I try to send it data... not even an error message when I send some spam. Any help would be greatly appreciated.

Well, I did not have a clear look at the code. But you said, you cannot send USER and NICK to IRC server. Did you try to listen your network traffic. For example with tcpdump or ethereal? I suggest you to run one of these tools and learn exactly what you send to the network.

When I get the successfull respons (upon connecting to the server) Ethereal shows an IRC response as expected. When I send out a message it sends a packet with my string I sent and looks fine, but I get back a bunch of jarble. Do I need to attatche a certain header or something... it seems like my data is actually being sent, which is not what I expected.

What does the printf("Sent(%d)... line give? Is it sending the entire buffer?
Do you need to send a newline after sending your USER command? (gets() will replace a terminating \n with a \0, see gets().) gets() also does no buffer overflow checking, its use is hazardous. Ensure that there is enough room in input. Most will recommend replacing your call of gets() with one to fgets(). (Which won't erase a newline, btw, again, read the help pages)

What does flusher() do? What will you do if send() doesn't send the complete buffer?
And last, select()'s first parameter is usually set to the highest file descriptor in any of the three sets, +1. See it's man page. This parameter is, I believe, ignored in Windows, but if you ever wanted to port to another platform, you might want to include it.