Subversion Repositories Okuu

Rev

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

Rev 5 Rev 7
Line 1... Line 1...
1
/* $Id: news.c 5 2024-09-11 00:26:25Z nishi $ */
1
/* $Id: news.c 7 2024-09-11 00:40:20Z nishi $ */
2
 
2
 
3
#define OK_NEWS_SRC
3
#define OK_NEWS_SRC
4
#include "ok_news.h"
4
#include "ok_news.h"
5
 
5
 
6
#include "ok_util.h"
6
#include "ok_util.h"
Line 284... Line 284...
284
			}
284
			}
285
		}
285
		}
286
		if(nntppass != NULL){
286
		if(nntppass != NULL){
287
			sprintf(construct, "AUTHINFO PASS %s\r\n", nntppass);
287
			sprintf(construct, "AUTHINFO PASS %s\r\n", nntppass);
288
			send(nt_sock, construct, strlen(construct), 0);
288
			send(nt_sock, construct, strlen(construct), 0);
-
 
289
			sta = ok_news_parse(nt_sock);
289
			if(sta != 281){
290
			if(sta != 281){
290
				goto cleanup;
291
				goto cleanup;
291
			}
292
			}
292
		}
293
		}
293
		send(nt_sock, "MODE READER\r\n", 4 + 1 + 6 + 2, 0);	
294
		send(nt_sock, "MODE READER\r\n", 4 + 1 + 6 + 2, 0);	
Line 298... Line 299...
298
			if(sta == 340){
299
			if(sta == 340){
299
				sprintf(construct, "From: %s\r\n", nntpfrom);
300
				sprintf(construct, "From: %s\r\n", nntpfrom);
300
				send(nt_sock, construct, strlen(construct), 0);
301
				send(nt_sock, construct, strlen(construct), 0);
301
				sprintf(construct, "Newsgroups: %s\r\n", nntpgroup);
302
				sprintf(construct, "Newsgroups: %s\r\n", nntpgroup);
302
				send(nt_sock, construct, strlen(construct), 0);
303
				send(nt_sock, construct, strlen(construct), 0);
303
				sprintf(construct, "Subject: Message from %s\r\n", nick);
304
				sprintf(construct, "Subject: [IRC] Message from %s\r\n", nick);
304
				send(nt_sock, construct, strlen(construct), 0);
305
				send(nt_sock, construct, strlen(construct), 0);
305
				send(nt_sock, "\r\n", 2, 0);
306
				send(nt_sock, "\r\n", 2, 0);
306
				char c;
307
				char c;
307
				int i;
308
				int i;
308
				bool first = true;
309
				bool first = true;