char* msg = ok_strcat(temp, line);
ircfw_socket_send_cmd(ok_sock, NULL, msg);
free(msg);
+ usleep(1000 * 100); /* Sleep for 100ms */
}
free(line);
count = atoi(list[i - 1]->d_name) + 1;
free(list);
}
- f = fopen(nntpcount, "wb");
- if(f != NULL){
- fwrite(&count, sizeof(count), 1, f);
- fclose(f);
+ if(sendable){
+ f = fopen(nntpcount, "wb");
+ if(f != NULL){
+ fwrite(&count, sizeof(count), 1, f);
+ fclose(f);
+ }
}
continue;
}
if(nntppass != NULL){
sprintf(construct, "AUTHINFO PASS %s\r\n", nntppass);
send(nt_sock, construct, strlen(construct), 0);
+ sta = ok_news_parse(nt_sock);
if(sta != 281){
goto cleanup;
}
send(nt_sock, construct, strlen(construct), 0);
sprintf(construct, "Newsgroups: %s\r\n", nntpgroup);
send(nt_sock, construct, strlen(construct), 0);
- sprintf(construct, "Subject: Message from %s\r\n", nick);
+ sprintf(construct, "Subject: [IRC] Message from %s\r\n", nick);
send(nt_sock, construct, strlen(construct), 0);
send(nt_sock, "\r\n", 2, 0);
char c;