Subversion Repositories Okuu

Rev

Rev 6 | Rev 8 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6 Rev 7
Line 1... Line 1...
1
/* $Id: bot.c 6 2024-09-11 00:32:13Z nishi $ */
1
/* $Id: bot.c 7 2024-09-11 00:40:20Z nishi $ */
2
 
2
 
3
#include "ok_bot.h"
3
#include "ok_bot.h"
4
 
4
 
5
#include "ok_util.h"
5
#include "ok_util.h"
6
#include "ok_news.h"
6
#include "ok_news.h"
Line 157... Line 157...
157
 
157
 
158
									if(strlen(line) > 0){
158
									if(strlen(line) > 0){
159
										char* msg = ok_strcat(temp, line);
159
										char* msg = ok_strcat(temp, line);
160
										ircfw_socket_send_cmd(ok_sock, NULL, msg);
160
										ircfw_socket_send_cmd(ok_sock, NULL, msg);
161
										free(msg);
161
										free(msg);
-
 
162
										usleep(1000 * 100); /* Sleep for 100ms */
162
									}
163
									}
163
 
164
 
164
									free(line);
165
									free(line);
165
									incr = j + 1;
166
									incr = j + 1;
166
									if(news_entry.content[j] == 0) break;
167
									if(news_entry.content[j] == 0) break;
Line 174... Line 175...
174
					free(list[i]);
175
					free(list[i]);
175
				}
176
				}
176
				count = atoi(list[i - 1]->d_name) + 1;
177
				count = atoi(list[i - 1]->d_name) + 1;
177
				free(list);
178
				free(list);
178
			}
179
			}
-
 
180
			if(sendable){
179
			f = fopen(nntpcount, "wb");
181
				f = fopen(nntpcount, "wb");
180
			if(f != NULL){
182
				if(f != NULL){
181
				fwrite(&count, sizeof(count), 1, f);
183
					fwrite(&count, sizeof(count), 1, f);
182
				fclose(f);
184
					fclose(f);
-
 
185
				}
183
			}
186
			}
184
			continue;
187
			continue;
185
		}
188
		}
186
		int st = ircfw_socket_read_cmd(ok_sock);
189
		int st = ircfw_socket_read_cmd(ok_sock);
187
		if(st != 0){
190
		if(st != 0){