fix stuff
git-svn-id: file:///raid/svn-personal/okuu/trunk@7 7d206d2a-66c2-044b-96de-ba755a9b3ba8
This commit is contained in:
parent
32122a996c
commit
812c58d2c1
11
Bot/bot.c
11
Bot/bot.c
|
@ -159,6 +159,7 @@ void ok_bot(void){
|
|||
char* msg = ok_strcat(temp, line);
|
||||
ircfw_socket_send_cmd(ok_sock, NULL, msg);
|
||||
free(msg);
|
||||
usleep(1000 * 100); /* Sleep for 100ms */
|
||||
}
|
||||
|
||||
free(line);
|
||||
|
@ -176,10 +177,12 @@ void ok_bot(void){
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -286,6 +286,7 @@ int ok_news_write(const char* nick, const char* message){
|
|||
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;
|
||||
}
|
||||
|
@ -300,7 +301,7 @@ int ok_news_write(const char* nick, const char* message){
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user