I have wrote a simple program for connecting irc servers. It's Ok but the parsing is the thing that i am confused about.
During the main loop ( while (1) thing) when i try the parse the lines, the bot is exiting like Client exited.Actually when i try this the bot can't stay in server.
Here is the samples:
void send_nickname_joined(Socket sock, char *buf)
nick = strtok(buf, "!");
send_server(sock, "%s has joinied", nick);
When i am commented out "send_nickname_joined(buf);" line the bot stays in server as long as i keep it.
int main ()
//irc connection routines
/* Connection Ok. Parsing.. */
readaline(sock, buf, sizeof(buf));
//check pings for pong
Any ideas, samples, codes would be appreciated.
Thanks in advanced.