Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

1 1 was a race-horse, 2 2 was 1 2. When 1 1 1 1 race, 2 2 1 1 2.


devel / rocksolid.programming / overchan

SubjectAuthor
* vichan to do listAnonymous
+- threadsAnonymous
+* subjectAnonymous
|`* subjectRetro Guy
| `* subjectRetro Guy
|  `* subjectRetro Guy
|   `- subjectanon
+* status updateAnonymous
|`* status updateRetro Guy
| `* status updateRetro Guy
|  +- status updateRetro Guy
|  `* status updateanon
|   +* status updateanon
|   |`* status updateRetro Guy
|   | `* status updateanon
|   |  `* status updateanon
|   |   `* status updateRetro Guy
|   |    +- status updateRetro Guy
|   |    `* status updateanon
|   |     `* status updateRetro Guy
|   |      `- status updateRetro Guy
|   `- status updateRetro Guy
+* vichan to do listanon
|+- vichan to do listRetro Guy
|`* vichan to do listanon
| `* vichan to do listRetro Guy
|  `* vichan to do listRetro Guy
|   `* vichan to do listRetro Guy
|    `* vichan to do listanonymous
|     `* vichan to do listRetro Guy
|      `* vichan to do listanon
|       `* vichan to do listRetro Guy
|        `* vichan to do listRetro Guy
|         `* vichan to do listRetro Guy
|          `* vichan to do listanon
|           +- vichan to do listanon
|           `* vichan to do listRetro Guy
|            `* vichan to do listRetro Guy
|             `* vichan to do listanonymous
|              `* vichan to do listanonymous
|               +- vichan to do listanonymous
|               `- vichan to do listRetro Guy
+* vichan to do listanon
|`* vichan to do listanon
| `- vichan to do listMarc SCHAEFER
+* vichan to do listanon
|`- vichan to do listRetro Guy
+* i just uploaded my code hereAnonymous
|`- i just uploaded my code hereRetro Guy
+- so far seems to workAnonymous
+- alright, multi server updateAnonymous
+* posting to new serverAnonymous
|`- posting to new serverRetro Guy
+- errorAnonymous
+* posting articlesAnonymous
|`- posting articlesRetro Guy
+* alright, i have it goingAnonymous
|`* alright, i have it goingRetro Guy
| `- alright, i have it goingRetro Guy
+* overchanAnonymous
|`- overchanRetro Guy
+- send to rslightAnonymous
+- btw, what about your vichan ?Anonymous
+* jsonAnonymous
|`- jsonMarc SCHAEFER
+- jsonAnonymous
+- date problemsAnonymous
+- ok, fixed the dateAnonymous
+* almost donetrw
|`- almost doneRetro Guy
+- almost doneAnonymous
`* latest codeAnonymous
 `* latest codeRetro Guy
  `* latest codeRetro Guy
   `* latest codeanon
    `* latest codeRetro Guy
     `* latest codeanon
      `* latest codeanon
       `* latest codeanon
        `* latest codeanon
         `- latest codereshmakavi

Pages:1234
posting to new server

<code.234.y6zym@anon.com>

  copy mid

https://novabbs.com/devel/article-flat.php?id=595&group=rocksolid.programming#595

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!.POSTED!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: posting to new server
Date: Sun, 07 Jun 2020 19:41:36 -0700
Organization: i2pn2 (i2pn.org)
Message-ID: <code.234.y6zym@anon.com>
References: <code.100.gmepn@anon.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: i2pn2.org; posting-account="def2";
logging-data="18226"; mail-complaints-to="usenet@i2pn2.org"
 by: Anonymous - Mon, 8 Jun 2020 02:41 UTC

for some reason the almost identical code sequence that works for send.php in rslight for posting messages to a news server (using the post command),
produces a 480 - posting not allowed when i try to use it for vichan (with the same server). guess i do something for the auth.
this is clearly not RESTful :-)

--
Posted on def2

Re: posting to new server

<4d48acb74a6d58689e0b61dd5adaeac9$1@www.novabbs.com>

  copy mid

https://novabbs.com/devel/article-flat.php?id=596&group=rocksolid.programming#596

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!.POSTED!not-for-mail
From: Retro ...@rslight.i2p (Retro Guy)
Newsgroups: rocksolid.programming
Subject: Re: posting to new server
Date: Mon, 8 Jun 2020 09:09 UTC
Organization: Rocksolid Light
Message-ID: <4d48acb74a6d58689e0b61dd5adaeac9$1@www.novabbs.com>
References: <code.100.gmepn@anon.com> <code.234.y6zym@anon.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="30237"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.com
X-Rslight-Site: $2y$10$PXCMmtHBsSvRw0Y0vZandOOBZpl30bNzUr2hwcdxlCeTPwpGEH.Pe
 by: Retro Guy - Mon, 8 Jun 2020 09:09 UTC

Anonymous wrote:

> for some reason the almost identical code sequence that works for send.php in rslight for posting messages to a news server (using the post command),
> produces a 480 - posting not allowed when i try to use it for vichan (with the same server). guess i do something for the auth.

Are you setting $remote_auth_user and $remote_auth_pass in the file? In rslight these are pulled from config. If that's ok, when exactly do you see the error? After AUTHINFO commands? After POST command?

The function nntp2_open in send.php uses language variables to display some errors. If you're not linked to rslight, you probably won't see the errors from it. You can just change those lines to display the text you want for the error.

BTW, the function nntp2_open in send.php and the modified vichan_nntp.php are identical functions. If you link the two files (include one in the other), you'll need to drop the function from the secondary function.

send.php does not include some functions it uses that are in newsportal.php. If you are running it not including that file, it probably won't work. The best way to handle it for now is to just copy the functions into the send.php you want to use. (vichan_send.php maybe?)

Retro Guy

--
Posted on: Rocksolid Light
www.novabbs.com

error

<code.239.kpuob@anon.com>

  copy mid

https://novabbs.com/devel/article-flat.php?id=600&group=rocksolid.programming#600

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!.POSTED!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: error
Date: Mon, 08 Jun 2020 08:05:52 -0700
Organization: i2pn2 (i2pn.org)
Message-ID: <code.239.kpuob@anon.com>
References: <code.100.gmepn@anon.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: i2pn2.org; posting-account="def2";
logging-data="15112"; mail-complaints-to="usenet@i2pn2.org"
 by: Anonymous - Mon, 8 Jun 2020 15:05 UTC

>when exactly do you see the error? After AUTHINFO commands? After POST command?

i am not sure, because with telnet everything works, and with the program, i don't see exactly what happens. some screwing up the auth, i think.
actually, ihave or takethis would be better than post.
this will take a but more tinkering.

--
Posted on def2

posting articles

<code.240.v0qks@anon.com>

  copy mid

https://novabbs.com/devel/article-flat.php?id=601&group=rocksolid.programming#601

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!.POSTED!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: posting articles
Date: Mon, 08 Jun 2020 09:53:58 -0700
Organization: i2pn2 (i2pn.org)
Message-ID: <code.240.v0qks@anon.com>
References: <code.100.gmepn@anon.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: i2pn2.org; posting-account="def2";
logging-data="31394"; mail-complaints-to="usenet@i2pn2.org"
 by: Anonymous - Mon, 8 Jun 2020 16:53 UTC

>Are you setting $remote_auth_user and
>$remote_auth_pass in the file?

i set the vars right (passing them on from the calling script), tested that before.

> when exactly do you see the error? After AUTHINFO commands? After POST command?

i don't know, because i don't see the intermediate stages. i guess i also had a mistake in parsing the the responses from the news server.
doing the same in telnet i get no error at all. guess it is not exactly the same that i do in telnet.

>The best way to handle it for now is to just copy the
>functions into the send.php you want to use.
>(vichan_send.php maybe?)

that is the question. i tried to make nntpchan.php from vichan working, which it did not for some reason. when i do the psoting to the news server there, i can't (or don't want) to drag a lot of libs in, because that will end up messy i guess, and i don't understand the vichan code well enough to really integrate it well.
the other option is to do the posting in the import script i have already (which would also become an export script than), in this case one more lib doesn't hurt. or maybe the posting function could be included in vichan_nntp.php ?
what i don't understand yet is how rslight can use POST to post an article with an existing message id ? i understand that normally the news server generates the number for you when you use POST (like for fudforum for example).
forwarding existing messages should (according to RFC) be done with IHAVE or TAKETHIS.
not that i will complain about this point if i can find a way to make this work, mind you :-).
the advantage of using POST is maybe that more news servers will let you use it vs streaming with IHAVE or TAKETHIS.
but anyway, it is maybe best to take that code outside from vichan and just continue to drop the messages as files in a defined directory. this way i can also implement a followup (post successful or not).

cheers

trw

--
Posted on def2

Re: posting articles

<ed5ca197618d28b7be8f535c7b6ff34b$1@www.novabbs.com>

  copy mid

https://novabbs.com/devel/article-flat.php?id=602&group=rocksolid.programming#602

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!.POSTED!not-for-mail
From: Retro ...@rslight.i2p (Retro Guy)
Newsgroups: rocksolid.programming
Subject: Re: posting articles
Date: Mon, 8 Jun 2020 23:19 UTC
Organization: Rocksolid Light
Message-ID: <ed5ca197618d28b7be8f535c7b6ff34b$1@www.novabbs.com>
References: <code.100.gmepn@anon.com> <code.240.v0qks@anon.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="18829"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.com
X-Rslight-Site: $2y$10$uXsfpgCtZyNUB5KerqYfMeyyHv7S0TgvJmPhwxqFEuXrgo7NdFuey
 by: Retro Guy - Mon, 8 Jun 2020 23:19 UTC

Anonymous wrote:

>>The best way to handle it for now is to just copy the
>>functions into the send.php you want to use.
>>(vichan_send.php maybe?)

> that is the question. i tried to make nntpchan.php from vichan working, which it did not for some reason. when i do the psoting to the news server there, i can't (or don't want) to drag a lot of libs in, because that will end up messy i guess, and i don't understand the vichan code well enough to really integrate it well.
> the other option is to do the posting in the import script i have already (which would also become an export script than), in this case one more lib doesn't hurt. or maybe the posting function could be included in vichan_nntp.php ?

That shouldn't be a problem, especially since send and retrieving articles share some functions.

> what i don't understand yet is how rslight can use POST to post an article with an existing message id ? i understand that normally the news server generates the number for you when you use POST (like for fudforum for example).
> forwarding existing messages should (according to RFC) be done with IHAVE or TAKETHIS.

inn and rslight news servers will accept articles which include a message-id, and retain that when receiving via the POST command. Both servers will create a m-id if one is not included, but will not change it if it is included.

Consider that rslight spools a message posted to it right away. It can't wait until after it's posted to an upstream server to then get a m-id, it needs one immediately to spool a proper article. It is intentional that when clicking 'Post' when sending a message in rslight, you need not wait for communication with an upstream server before moving along. On i2p especially, this is important.

But when posting to inn or rslight from vichan, including a message-id in your message is not required, it's just supported.

> not that i will complain about this point if i can find a way to make this work, mind you :-).
> the advantage of using POST is maybe that more news servers will let you use it vs streaming with IHAVE or TAKETHIS.

Exactly. Most servers will not allow IHAVE or TAKETHIS (streaming), but any server you can post to with a reader will respond to POST properly.

> but anyway, it is maybe best to take that code outside from vichan and just continue to drop the messages as files in a defined directory. this way i can also implement a followup (post successful or not).

Since you already have a properly formatted message coming out of vichan, it really should be a simple matter of (taken from send.php):

$messages = scandir($outgoing_dir);
foreach($messages as $message) {
if(!is_file($outgoing_dir.$message)) {
continue;
}
echo "Sending: ".$outgoing_dir.$message."rn";
fputs($ns, "MODE READERrn");
$response = line_read($ns);
if (strcmp(substr($response,0,3),"200") != 0) {
file_put_contents($logfile, "n".format_log_date()." ".$config_name." Unexpected response to MODE command: ".$response, FILE_APPEND);
return $response;
}
fputs($ns, "POSTrn");
$response = line_read($ns);
if (strcmp(substr($response,0,3),"340") != 0) {
file_put_contents($logfile, "n".format_log_date()." ".$config_name." Unexpected response to POST command: ".$response, FILE_APPEND);
return $response;
}
$message_fp = fopen($outgoing_dir.$message, "rb");
while (($msgline = fgets($message_fp, 4096)) !== false) {
fputs($ns, $msgline);
}
fputs($ns, ".rn");
fclose($message_fp);
$response = line_read($ns);
if (strcmp(substr($response,0,3),"240") == 0) {
unlink($outgoing_dir.$message);
file_put_contents($logfile, "n".format_log_date()." ".$config_name." Posted: ".$message.": ".$response, FILE_APPEND);
} else {
file_put_contents($logfile, "n".format_log_date()." ".$config_name." Failed to POST: ".$message.": ".$response, FILE_APPEND);
continue;
}
}
return "Messages sentrn";

The above is sending from a file, but could just as easily be sending from a variable.

Retro Guy

--
Posted on: Rocksolid Light
www.novabbs.com

alright, i have it going

<code.242.c3tf8@anon.com>

  copy mid

https://novabbs.com/devel/article-flat.php?id=603&group=rocksolid.programming#603

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!.POSTED!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: alright, i have it going
Date: Tue, 09 Jun 2020 01:50:53 -0700
Organization: def2
Message-ID: <code.242.c3tf8@anon.com>
References: <code.100.gmepn@anon.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: i2pn2.org; posting-account="def2";
logging-data="19341"; mail-complaints-to="usenet@i2pn2.org"
 by: Anonymous - Tue, 9 Jun 2020 08:50 UTC

thanks for the code. i had to change a few places, like:
echo "Sending: ".$outgoing_dir.$message."rn";
to
echo "Sending: ".$outgoing_dir.$message."\n\r";
and, more importantly:
fputs($ns, "MODE READERrn");
to
fputs($ns, "MODE READER\r\n");
and like that in all the places sending this sequence.

in the process i discovered that subjects with "\" will break something in bbs :-).

anyway, it is working, and vichan posts directly to news servers now.
so now, it can run without any local news server, meaning you should be able to sync any existing installation to newsgroups.
very cool.
i need to clean up my code, it is still horrible right now, and i guess it can be done in half of the lines.
after that, maybe we should publish that somewhere it can be found (thinking some fork on github or so...). i know i said earlier a fork would be too heavy for me, but maybe we can offer it to some existing fork ? what do you think ?
i just have the feeling it would be unfair to build on something existing and than not sharing your results.

anyway, it is working. very nice. :-)

cheers

trw

--
Posted on def2

overchan

<code.243.sgfuu@anon.com>

  copy mid

https://novabbs.com/devel/article-flat.php?id=604&group=rocksolid.programming#604

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!.POSTED!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: overchan
Date: Tue, 09 Jun 2020 02:17:53 -0700
Organization: i2pn2 (i2pn.org)
Message-ID: <code.243.sgfuu@anon.com>
References: <code.100.gmepn@anon.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: i2pn2.org; posting-account="def2";
logging-data="23137"; mail-complaints-to="usenet@i2pn2.org"
 by: Anonymous - Tue, 9 Jun 2020 09:17 UTC

btw, this setup should also be a compliant implementation of overchan. i wonder whatever became of this project. it was really huge in terms of numbers of nodes once.

--
Posted on def2

Re: alright, i have it going

<af2714efad772509ed9085d4d1de1fc8$1@www.novabbs.com>

  copy mid

https://novabbs.com/devel/article-flat.php?id=605&group=rocksolid.programming#605

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!.POSTED!not-for-mail
From: Retro ...@rslight.i2p (Retro Guy)
Newsgroups: rocksolid.programming
Subject: Re: alright, i have it going
Date: Tue, 9 Jun 2020 09:18 UTC
Organization: Rocksolid Light
Message-ID: <af2714efad772509ed9085d4d1de1fc8$1@www.novabbs.com>
References: <code.100.gmepn@anon.com> <code.242.c3tf8@anon.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="23757"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.com
X-Rslight-Site: $2y$10$ofehnEnLe27JOyEk53.GPuzZB0wSp.bmbilEMozot/8jXT5I/9irm
 by: Retro Guy - Tue, 9 Jun 2020 09:18 UTC

Anonymous wrote:

> thanks for the code. i had to change a few places, like:
> echo "Sending: ".$outgoing_dir.$message."rn";
> to
> echo "Sending: ".$outgoing_dir.$message."nr";
> and, more importantly:
> fputs($ns, "MODE READERrn");
> to
> fputs($ns, "MODE READERrn");
> and like that in all the places sending this sequence.

Yes, rslight removes the backslash when displaying the code. What I sent had the backslashes but they were stripped for display.

> in the process i discovered that subjects with "" will break something in bbs :-).

There's always something new in everybody's code :)

> anyway, it is working, and vichan posts directly to news servers now.
> so now, it can run without any local news server, meaning you should be able to sync any existing installation to newsgroups.
> very cool.

One of the links I sent in r.s.encryption is an rslight nntp server. If you want to test syncing vichan directly to rslight and back, it might be a great test to prove no inn servers are required. I already sync one rslight site to another successfully. (My freebsd test site to rslight.i2p)

> i need to clean up my code, it is still horrible right now, and i guess it can be done in half of the lines.

Uh, yeah, me too :)

> after that, maybe we should publish that somewhere it can be found (thinking some fork on github or so...). i know i said earlier a fork would be too heavy for me, but maybe we can offer it to some existing fork ? what do you think ?
> i just have the feeling it would be unfair to build on something existing and than not sharing your results.

I agree that when it's working well, provide a download at least. That's all I do for rslight. I have no github, cvs or anything, but it can be downloaded. I'd do the same for vichan. If someone wants to fork what you wrote, that's great, but it's nice to keep your own fork for your own mods, etc.

> anyway, it is working. very nice. :-)

I'm amazed at how fast you got this working! Great work!

Retro Guy

--
Posted on: Rocksolid Light
www.novabbs.com

Re: alright, i have it going

<cc634cbd55304dfe17e67f4c4b965d20$1@www.novabbs.com>

  copy mid

https://novabbs.com/devel/article-flat.php?id=606&group=rocksolid.programming#606

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!.POSTED!not-for-mail
From: Retro ...@rslight.i2p (Retro Guy)
Newsgroups: rocksolid.programming
Subject: Re: alright, i have it going
Date: Tue, 9 Jun 2020 09:26 UTC
Organization: Rocksolid Light
Message-ID: <cc634cbd55304dfe17e67f4c4b965d20$1@www.novabbs.com>
References: <code.100.gmepn@anon.com> <code.242.c3tf8@anon.com> <af2714efad772509ed9085d4d1de1fc8$1@www.novabbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="24531"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.com
X-Rslight-Site: $2y$10$jWV9DVcLFr9o6P2wrNdQ/OiKXQOksAQQZYavj3zuJAlwtGOnjE1S.
 by: Retro Guy - Tue, 9 Jun 2020 09:26 UTC

Retro Guy wrote:

> Anonymous wrote:

>> in the process i discovered that subjects with "" will break something in bbs :-).

> There's always something new in everybody's code :)

I noticed earlier today that rslight's overboard did not display koi-8 correctly. The article would display properly, but not in the overboard. That's fixed now :)

Retro Guy

--
Posted on: Rocksolid Light
www.novabbs.com

Re: overchan

<3cda52f0385cd009e004a430109a333f$1@www.novabbs.com>

  copy mid

https://novabbs.com/devel/article-flat.php?id=607&group=rocksolid.programming#607

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!.POSTED!not-for-mail
From: Retro ...@rslight.i2p (Retro Guy)
Newsgroups: rocksolid.programming
Subject: Re: overchan
Date: Tue, 9 Jun 2020 09:24 UTC
Organization: Rocksolid Light
Message-ID: <3cda52f0385cd009e004a430109a333f$1@www.novabbs.com>
References: <code.100.gmepn@anon.com> <code.243.sgfuu@anon.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="24531"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.com
X-Rslight-Site: $2y$10$JK19jXDa82AZxV3WJWZueOKDu5ZK5C5A5Bxr/tsX4O1a8Ir1tZ/0q
 by: Retro Guy - Tue, 9 Jun 2020 09:24 UTC

Anonymous wrote:

> btw, this setup should also be a compliant implementation of overchan. i wonder whatever became of this project. it was really huge in terms of numbers of nodes once.

It's odd how it just kind of went away. It seemed to work fine.

--
Posted on: Rocksolid Light
www.novabbs.com

send to rslight

<code.247.42sjgg@anon.com>

  copy mid

https://novabbs.com/devel/article-flat.php?id=608&group=rocksolid.programming#608

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!.POSTED!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: send to rslight
Date: Tue, 09 Jun 2020 02:35:21 -0700
Organization: i2pn2 (i2pn.org)
Message-ID: <code.247.42sjgg@anon.com>
References: <code.100.gmepn@anon.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: i2pn2.org; posting-account="def2";
logging-data="25345"; mail-complaints-to="usenet@i2pn2.org"
 by: Anonymous - Tue, 9 Jun 2020 09:35 UTC

>it might be a great test to prove no inn servers are required.

did that with my own instance already, it is working.

--
Posted on def2

Re: vichan to do list

<rbnsoj$dcr$1@shakotay.alphanet.ch>

  copy mid

https://novabbs.com/devel/article-flat.php?id=609&group=rocksolid.programming#609

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!news.uzoreto.com!news.alphanet.ch!alphanet.ch!.POSTED!news.alphanet.ch!not-for-mail
From: schae...@alphanet.ch (Marc SCHAEFER)
Newsgroups: rocksolid.programming
Subject: Re: vichan to do list
Date: Tue, 9 Jun 2020 13:45:23 +0200 (CEST)
Organization: Posted through ALPHANET (https://news.alphanet.ch/)
Lines: 27
Message-ID: <rbnsoj$dcr$1@shakotay.alphanet.ch>
References: <35db30288bbd4e1413b8b0eaa046e842@def4> <baaa76a54beb2e083eff23bc515a509e@def4>
NNTP-Posting-Host: localhost
X-Trace: shakotay.alphanet.ch 1591703123 13725 127.0.0.1 (9 Jun 2020 11:45:23 GMT)
X-Complaints-To: usenet@alphanet.ch
NNTP-Posting-Date: Tue, 9 Jun 2020 11:45:23 +0000 (UTC)
User-Agent: tin/2.2.1-20140504 ("Tober an Righ") (UNIX) (Linux/3.16.0-10-amd64 (x86_64))
 by: Marc SCHAEFER - Tue, 9 Jun 2020 11:45 UTC

anon <anon@anon.com> wrote:
> POST /post.php HTTP/1.1

In case, you can see JSON from my read-only newsreader here:

https://nnrp.alphanet.ch/newsgroup/rocksolid.programming/%3C8cb53de068f68ce971aa235b44272aab%241%40news.novabbs.com%3E?mode=json

Implementation:

if ($self->param('mode') eq 'json') {
my %headers;

my $headers = $a->headers;
# yeah, not simple re
# - to make the loop work, we need to not remove the final \n if any, so we use
# a look-ahead: https://stackoverflow.com/questions/3926451/how-to-match-but-not-capture-part-of-a-regex
# - we accept continuation lines
# - maybe the header re is a bit too strict
# - 'rest' should be empty if all was right
$headers =~ s/(^|\n)([a-zA-Z0-9\-]+):\s?(.*)(\n\s+.*|)(?=\n|$)/$headers{$2} = $3 . $4; ""/eg;

$self->render(json => { 'headers' => \%headers,
'body' => $a->body,
'headers_raw' => $a->headers,
'rest' => $headers
});
}

btw, what about your vichan ?

<code.249.2rgx4q@anon.com>

  copy mid

https://novabbs.com/devel/article-flat.php?id=610&group=rocksolid.programming#610

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!.POSTED!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: btw, what about your vichan ?
Date: Tue, 09 Jun 2020 04:54:04 -0700
Organization: i2pn2 (i2pn.org)
Message-ID: <code.249.2rgx4q@anon.com>
References: <code.100.gmepn@anon.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: i2pn2.org; posting-account="def2";
logging-data="13437"; mail-complaints-to="usenet@i2pn2.org"
 by: Anonymous - Tue, 9 Jun 2020 11:54 UTC

do you want to start soon, or wait a little longer ?
if you want to start soon, i would also start to work on the direct syncing (so: pushing messages from one instance of vichan to another via http).
if not, i will focus on something else first (like: dealing with attachments in a good way).
and talking about attachments: can we agree on limiting the number of attachments to one for the rocksolid groups ?

cheers

trw

--
Posted on def2

json

<code.250.js709@anon.com>

  copy mid

https://novabbs.com/devel/article-flat.php?id=611&group=rocksolid.programming#611

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!rocksolid2!def5!.POSTED.bogusentry!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: json
Date: Tue, 09 Jun 2020 05:30:07 -0700
Organization: def5
Message-ID: <code.250.js709@anon.com>
References: <code.100.gmepn@anon.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: def5.org; posting-host="bogusentry:192.168.1.189";
logging-data="14174"; mail-complaints-to="usenet@def5.org"
 by: Anonymous - Tue, 9 Jun 2020 12:30 UTC

>In case, you can see JSON from my read-only newsreader here:

yes i can see json :-)
what about it ? what do you achieve with that code ?

--
Posted on def2

Re: json

<rbo4e8$d5d$1@shakotay.alphanet.ch>

  copy mid

https://novabbs.com/devel/article-flat.php?id=612&group=rocksolid.programming#612

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!news.uzoreto.com!news.alphanet.ch!alphanet.ch!.POSTED!news.alphanet.ch!not-for-mail
From: schae...@alphanet.ch (Marc SCHAEFER)
Newsgroups: rocksolid.programming
Subject: Re: json
Date: Tue, 9 Jun 2020 15:56:24 +0200 (CEST)
Organization: Posted through ALPHANET (https://news.alphanet.ch/)
Lines: 7
Message-ID: <rbo4e8$d5d$1@shakotay.alphanet.ch>
References: <code.100.gmepn@anon.com> <code.250.js709@anon.com>
NNTP-Posting-Host: localhost
X-Trace: shakotay.alphanet.ch 1591710984 13486 127.0.0.1 (9 Jun 2020 13:56:24 GMT)
X-Complaints-To: usenet@alphanet.ch
NNTP-Posting-Date: Tue, 9 Jun 2020 13:56:24 +0000 (UTC)
User-Agent: tin/2.2.1-20140504 ("Tober an Righ") (UNIX) (Linux/3.16.0-10-amd64 (x86_64))
 by: Marc SCHAEFER - Tue, 9 Jun 2020 13:56 UTC

Anonymous <poster@anon.com> wrote:
> yes i can see json :-)
> what about it ? what do you achieve with that code ?

I saw some discussions about people wanting some JSON access to rocksolid, so
this is another. As it was trivial to add JSON support to my read-only
web NNRP interface, I did it.

json

<code.252.3c4fkt@anon.com>

  copy mid

https://novabbs.com/devel/article-flat.php?id=613&group=rocksolid.programming#613

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!.POSTED!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: json
Date: Tue, 09 Jun 2020 08:03:45 -0700
Organization: i2pn2 (i2pn.org)
Message-ID: <code.252.3c4fkt@anon.com>
References: <code.100.gmepn@anon.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: i2pn2.org; posting-account="def2";
logging-data="9974"; mail-complaints-to="usenet@i2pn2.org"
 by: Anonymous - Tue, 9 Jun 2020 15:03 UTC

>I saw some discussions about people wanting some
>JSON access to rocksolid, so

I guess you refer to Retro Guy and myself discussing. The interface I introduced on one of my nodes is using json now to receive posts that are synced from other nodes (+ there is a json api already that comes with it).

> As it was trivial to add JSON support to my read
>only web NNRP interface, I did it.

yeah, i took a look at the link (also linked your site here, btw).

cheers

trw

--
Posted on def2

date problems

<code.273.3lnqdz@anon.com>

  copy mid

https://novabbs.com/devel/article-flat.php?id=633&group=rocksolid.programming#633

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!.POSTED!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: date problems
Date: Fri, 12 Jun 2020 08:01:39 -0700
Organization: i2pn2 (i2pn.org)
Message-ID: <code.273.3lnqdz@anon.com>
References: <code.100.gmepn@anon.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: i2pn2.org; posting-account="def2";
logging-data="15740"; mail-complaints-to="usenet@i2pn2.org"
 by: Anonymous - Fri, 12 Jun 2020 15:01 UTC

>-fix date for message import

this one turns out to be really tough. i think it was not meant to work that way (so, to have the original posting time).

i have this line here in the function post (functions.php), which sets the time for the article to be inserted:

$query->bindValue(':time', isset($post['time']) ? $post['time'] : time(), PDO::PARAM_INT);

so, if we don't have a time, we take the current time. this is how i read this line.
but for some reason even if the variable is set to the original time of the article, the current time is taken instead.
maybe it has to do the complicated callback construct that they use (which i don't fully understand).

:-(

trw

--
Posted on def2

ok, fixed the date

<code.274.1w7710@anon.com>

  copy mid

https://novabbs.com/devel/article-flat.php?id=634&group=rocksolid.programming#634

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!.POSTED!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: ok, fixed the date
Date: Fri, 12 Jun 2020 11:23:51 -0700
Organization: i2pn2 (i2pn.org)
Message-ID: <code.274.1w7710@anon.com>
References: <code.100.gmepn@anon.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: i2pn2.org; posting-account="def2";
logging-data="12012"; mail-complaints-to="usenet@i2pn2.org"
 by: Anonymous - Fri, 12 Jun 2020 18:23 UTC

had nothing to do with the callback function, i was simply setting the variable after it was used.

new status:

open:
-fix proper handling of attachments from imported messages
-code simplification and cleanup

closed:
-fix date for message import
-fix catalog link in the footer, catalog is off: i thought i had to change the templates, but it is just a switch in the config
-fix threading: fixed some issues in the import script
-mime encode subject if needed: thx to Retro Guys line

after i have fixed the part with the attachments, i will reimport all the messages one last time.

cheers

trw

--
Posted on def2

almost done

<code.275.3k84ni@anon.com>

  copy mid

https://novabbs.com/devel/article-flat.php?id=635&group=rocksolid.programming#635

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!.POSTED!not-for-mail
From: pos...@anon.com (trw)
Newsgroups: rocksolid.programming
Subject: almost done
Date: Fri, 12 Jun 2020 15:00:41 -0700
Organization: i2pn2 (i2pn.org)
Message-ID: <code.275.3k84ni@anon.com>
References: <code.100.gmepn@anon.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: i2pn2.org; posting-account="def2";
logging-data="11012"; mail-complaints-to="usenet@i2pn2.org"
 by: trw - Fri, 12 Jun 2020 22:00 UTC

open:
-code simplification and cleanup

closed:
-fix proper handling of attachments from imported messages
-fix date for message import
-fix catalog link in the footer, catalog is off: i thought i had to change the templates, but it is just a switch in the config
-fix threading: fixed some issues in the import script
-mime encode subject if needed: thx to Retro Guys line

Retru, do you want to test this as well ? Do you want to roll out vichan, or wait a little longer (until all the bugs are hope fully squashed) ?

cheers

trw

--
Posted on def2

Re: almost done

<c64967a9f9a5f6fc9b1625b464cd321e$1@www.novabbs.com>

  copy mid

https://novabbs.com/devel/article-flat.php?id=636&group=rocksolid.programming#636

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!.POSTED!not-for-mail
From: Retro ...@rslight.i2p (Retro Guy)
Newsgroups: rocksolid.programming
Subject: Re: almost done
Date: Sat, 13 Jun 2020 07:44 UTC
Organization: Rocksolid Light
Message-ID: <c64967a9f9a5f6fc9b1625b464cd321e$1@www.novabbs.com>
References: <code.100.gmepn@anon.com> <code.275.3k84ni@anon.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="18965"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.com
X-Rslight-Site: $2y$10$Zj21kCOtaKJtW8lt2rq0puhzM4y51cVE1q87as7AaGLB50dNZ00W6
 by: Retro Guy - Sat, 13 Jun 2020 07:44 UTC

trw wrote:

> open:
> -code simplification and cleanup

> closed:
> -fix proper handling of attachments from imported messages
> -fix date for message import
> -fix catalog link in the footer, catalog is off: i thought i had to change the templates, but it is just a switch in the config
> -fix threading: fixed some issues in the import script
> -mime encode subject if needed: thx to Retro Guys line

It's really looking good! I haven't checked out imported messages with attachments yet, but it sounds like you have it working :)

> Retru, do you want to test this as well ? Do you want to roll out vichan, or wait a little longer (until all the bugs are hope fully squashed) ?

I would like to check it out, and eventually set one up as a node. I'm interested in seeing the nntp code (send/receive) and maybe also find some nice ideas for future stuff.

If it can be placed in a tarball or something, I'll try it out. I think it requires mysql, if I'm not mistaken.

Retro Guy

--
Posted on: Rocksolid Light
www.novabbs.com

almost done

<code.277.1f4ryv@anon.com>

  copy mid

https://novabbs.com/devel/article-flat.php?id=637&group=rocksolid.programming#637

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!rocksolid2!.POSTED.127.215.126.48!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: almost done
Date: Sat, 13 Jun 2020 04:55:24 -0700
Organization: rocksolid2 (news.novabbs.com)
Message-ID: <code.277.1f4ryv@anon.com>
References: <code.100.gmepn@anon.com>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary=f33f8ae2e5abeeaf212a8786c1ef3516a0f07c0c
Injection-Info: novabbs.com; posting-account="def.i2p"; posting-host="127.215.126.48";
logging-data="14085"; mail-complaints-to="usenet@novabbs.com"
 by: Anonymous - Sat, 13 Jun 2020 11:55 UTC
Attachments: "vichan_sync_v0.1.zip"; name="attachment" (application/zip)

>It's really looking good! I haven't checked out imported messages with attachments yet, but it sounds like you have it working :)

yes, it looks like it (you can check on def2.i2p/ts how it displays). of course all depends on getting the attachment first (so the rslight code). thats's why it's great news for me that you solved these darn inline attachments (like def3 makes).

>I would like to check it out, and eventually set one up as a node.

ok, i will upload an archive with the code (attached to this message).

>I'm interested in seeing the nntp code (send/receive) and maybe also find some nice ideas for future stuff.

well, you will see a lot of your own code :-).

the question for me is how soon you will roll out. if it is sooner, i will work on one last point first before the cleanup, which is the direct syncing between two vichan nodes, using the modified post.php. if you will wait a little longer, i will clean up the code first and than add that feature when needed.

>If it can be placed in a tarball or something, I'll >try it out. I think it requires mysql, if I'm not >mistaken.

yes, you need mysql and pdo to run vichan. if you go back to the original tinyIB code, there is an option to run with flat files. but the setup process of vichan was absolutely painless for me, so i did not really investigate further.

let me know if you need help to run the code, it is still very rough.
you will need to adapt sync.php and nntpchan.php to reflect your directories and news server settings.

cheers

trw

Attachments: "vichan_sync_v0.1.zip"; name="attachment" (application/zip)
latest code

<code.393.9xhc4@anon.com>

  copy mid

https://novabbs.com/devel/article-flat.php?id=640&group=rocksolid.programming#640

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!rocksolid2!def5!.POSTED.bogusentry!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: latest code
Date: Sat, 13 Jun 2020 16:21:20 -0700
Organization: def5
Message-ID: <code.393.9xhc4@anon.com>
References: <code.100.gmepn@anon.com>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary=3ca0c89d94899557e5fc69e877799b62e134884a
Injection-Info: def5.org; posting-host="bogusentry:192.168.1.189";
logging-data="31598"; mail-complaints-to="usenet@def5.org"
 by: Anonymous - Sat, 13 Jun 2020 23:21 UTC
Attachments: vichan_sync_v0.11.zip (application/zip)

please find attached the latest code archive, the other one was missing a file. also the update concerning the attachments is included.

cheers

trw

Attachments: vichan_sync_v0.11.zip (application/zip)
Re: latest code

<c1679b2fa98bc6b358c530c3eaffccdd$1@www.novabbs.com>

  copy mid

https://novabbs.com/devel/article-flat.php?id=643&group=rocksolid.programming#643

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!.POSTED!not-for-mail
From: Retro ...@rslight.i2p (Retro Guy)
Newsgroups: rocksolid.programming
Subject: Re: latest code
Date: Sun, 14 Jun 2020 06:31 UTC
Organization: Rocksolid Light
Message-ID: <c1679b2fa98bc6b358c530c3eaffccdd$1@www.novabbs.com>
References: <code.100.gmepn@anon.com> <code.393.9xhc4@anon.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="30905"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.com
X-Rslight-Site: $2y$10$X7Lq8WENiP3FPB.Zn9dDjOkjNZYfsbSyw5fXMZUtzcZskfP7m/GXi
 by: Retro Guy - Sun, 14 Jun 2020 06:31 UTC

Anonymous wrote:

> please find attached the latest code archive, the other one was missing a file. also the update concerning the attachments is included.

Thanks! I'll take a look at this in a couple of days. I'm quite curious to see how vichan is written.

Retro Guy

--
Posted on: Rocksolid Light
www.novabbs.com

Re: latest code

<ada122da5599bf977966c652e9b89bdc$1@www.novabbs.com>

  copy mid

https://novabbs.com/devel/article-flat.php?id=647&group=rocksolid.programming#647

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!.POSTED!not-for-mail
From: Retro ...@rslight.i2p (Retro Guy)
Newsgroups: rocksolid.programming
Subject: Re: latest code
Date: Mon, 15 Jun 2020 10:07 UTC
Organization: Rocksolid Light
Message-ID: <ada122da5599bf977966c652e9b89bdc$1@www.novabbs.com>
References: <code.100.gmepn@anon.com> <code.393.9xhc4@anon.com> <c1679b2fa98bc6b358c530c3eaffccdd$1@www.novabbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="29338"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.com
X-Rslight-Site: $2y$10$LB2aPVeJl.qjcVIcSkkv/OlotXhmXhRtNrdcA7s/GsW5rQnCjY7KK
 by: Retro Guy - Mon, 15 Jun 2020 10:07 UTC

Retro Guy wrote:

> Anonymous wrote:

>> please find attached the latest code archive, the other one was missing a file. also the update concerning the attachments is included.

> Thanks! I'll take a look at this in a couple of days. I'm quite curious to see how vichan is written.

I've downloaded and installed (on top of vichan-devel). I kept the dir structure from your zip and put it into the devel structure. Then installed (seems vichan requires php-mcrypt) but that's not listed in Requirements in the README).

Anyway, it installs easily, and I set the nntp server in config file. I then found sync.php and ran it as www-data user in the directory it's in (./debug). Not sure if I was supposed to run it, or move it elsewhere, or run it from another dir, but I ran it from there. It created the thread files in ./threads fine (nice).

What I don't know is how to I tie those to the boards in vichan? So, what did I do wrong, or what have I not done yet that I need to do? :)

Thanks,

Retro Guy

--
Posted on: Rocksolid Light
www.novabbs.com

Re: latest code

<c1745706afd0f31fd468c5bced04ec4b@def4>

  copy mid

https://novabbs.com/devel/article-flat.php?id=649&group=rocksolid.programming#649

  copy link   Newsgroups: rocksolid.programming
Path: i2pn2.org!rocksolid2!def5!POSTED.localhost!not-for-mail
From: ano...@anon.com (anon)
Newsgroups: rocksolid.programming
Message-ID: <c1745706afd0f31fd468c5bced04ec4b@def4>
Subject: Re: latest code
Date: Mon, 15 Jun 2020 19:39:06+0000
Organization: def5
In-Reply-To: <ada122da5599bf977966c652e9b89bdc$1@www.novabbs.com>
References: <ada122da5599bf977966c652e9b89bdc$1@www.novabbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
 by: anon - Mon, 15 Jun 2020 19:39 UTC

>Then installed (seems vichan requires php-mcrypt) but that's not listed in Requirements in the README).

Strange, either I had that installed already, or there is something different between our installations. I don't recall having to do that.

>Anyway, it installs easily, and I set the nntp server in config file.

Good, that was the same for me, installation was easy.

>I then found sync.php and ran it as www-data user in the directory it's in (./debug). Not sure if I was supposed to run it, or move it elsewhere, or run it from another dir, but I ran it from there.

That's fine. It can run from anywhere, and you can run it from cli or call it from cron.
Did you put gpost.php in the webroot (next to post.php) ?

> It created the thread files in ./threads fine (nice).

There should also be a dir named "watermarks". If not, something went wrong.

>What I don't know is how to I tie those to the boards in vichan?

Each board needs to be set in its config file, and there you make the connection to the newsgroup.
Also in sync.php there is an array called "translation" which needs to be set (I will take that from the central config later).

> So, what did I do wrong, or what have I not done yet that I need to do? :)

I would suggest to start with one group only:
-set it in the central config
-set it in the board config
-set it in sync.php
and let run again.

What is the content of error.log and application.log ?

cheers

trw

Posted on def4

Pages:1234
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor