• Contiki IRC

    From Jeremiah Stoddard@21:1/5 to All on Sat Feb 4 21:18:41 2023
    Hi all,

    I had some issues the IRC application in Contiki to work: I had Contiki in
    a subdirectory on a (virtual via FloppyEmu) hard disk. Since the web
    browser worked fine, I initially didn't think that would be the problem,
    but booting straight to a Contiki disk image works fine. I thought I would throw that out there, in case someone else tries to do the same silly
    thing I wanted to do. (Plus I wanted to post a message to see if I have
    usenet working well enough from a IIe-accessible shell account.)

    By the way, Contiki IRC doesn't seem to have the "msg" command implemented (necessary for identifying oneself to libera.chat's NickServ). Not that I expect to be a regular Contiki IRC user, but is that something that's
    easily implemented? If so, is it likely doable by someone approaching the problem with very little cc65 experience, and unfamiliar with Contiki internals?

    -Jeremiah

    jstoddard@sdf.org
    SDF Public Access UNIX System - http://sdf.org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jeremiah Stoddard@21:1/5 to All on Sat Feb 4 23:35:57 2023
    So, replying to myself:

    By the way, Contiki IRC doesn't seem to have the "msg" command implemented (necessary for identifying oneself to libera.chat's NickServ).

    I glanced quickly at some information on the IRC protocol, and likewise
    took a quick look at the Contiki IRC source code. I think I have enough of
    an understanding to speculate that someone inexpert like myself could do
    this, and of how to approach the problem.

    The PRIVMSG command seems to be used both for private messages and for
    messages to channels. It is already implemented in Contiki in the latter context. I think "/msg" would need to send the same thing to the IRC
    server, just with the immediately following word (rather than a channel
    name) as the recipient.

    I think a new "else if" section in the parse_line function under
    if(line[0] == '/'), to handle "msg" can take care of recognizing the
    command. I'll have to look a little closer at the data structures and
    existing functions: I don't know whether ircc_msg() can be used directly,
    or adapted to also handle this type of message, or if it would be better
    to add a new function, like ircc_privmsg()... Either way, the line entered
    by the user needs to be parsed a little extra to pull out the recipient
    before grabbing the rest as the message.

    I hope I'm not way off base here.

    -Jeremiah

    jstoddard@sdf.org
    SDF Public Access UNIX System - http://sdf.org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jeremiah Stoddard@21:1/5 to All on Sun Feb 5 01:44:34 2023
    Eureka!

    By the way, Contiki IRC doesn't seem to have the "msg" command implemented >> (necessary for identifying oneself to libera.chat's NickServ).

    I glanced quickly at some information on the IRC protocol, and likewise took a quick look at the Contiki IRC source code. I think I have enough of an understanding to speculate that someone inexpert like myself could do this, and of how to approach the problem.

    Okay, sorry for the three successive posts to the newsgroup, but I added a "/msg" command to Contiki IRC, and in a one-minute test it seems to work
    well enough to allow me to verify my identity with NickServ! I'm reluctant
    to put in a pull request, since I suspect my changes aren't in keeping
    with the quality of the rest of the code, but it's up at github.com/jstoddard/contiki -- It mainly involves the new function ircc_privmessage and a corresponding PT_THREAD procedure, as well as a new member in the ircc_state struct for the message recipient.

    - Jeremiah

    jstoddard@sdf.org
    SDF Public Access UNIX System - http://sdf.org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Steve Nickolas@21:1/5 to Jeremiah Stoddard on Sun Feb 5 12:21:51 2023
    On Sat, 4 Feb 2023, Jeremiah Stoddard wrote:

    So, replying to myself:

    By the way, Contiki IRC doesn't seem to have the "msg" command implemented >> (necessary for identifying oneself to libera.chat's NickServ).

    I glanced quickly at some information on the IRC protocol, and likewise took a quick look at the Contiki IRC source code. I think I have enough of an understanding to speculate that someone inexpert like myself could do this, and of how to approach the problem.

    I am quite familiar with the IRC protocol and have written a client for
    MS-DOS.

    The PRIVMSG command seems to be used both for private messages and for messages to channels. It is already implemented in Contiki in the latter context. I think "/msg" would need to send the same thing to the IRC server, just with the immediately following word (rather than a channel name) as the recipient.

    /msg NICK MESSAGE -> PRIVMSG NICK :MESSAGE

    I think a new "else if" section in the parse_line function under if(line[0] == '/'), to handle "msg" can take care of recognizing the command. I'll have to look a little closer at the data structures and existing functions: I don't know whether ircc_msg() can be used directly, or adapted to also handle this type of message, or if it would be better to add a new function, like ircc_privmsg()... Either way, the line entered by the user needs to be parsed a little extra to pull out the recipient before grabbing the rest as the message.

    I hope I'm not way off base here.

    -Jeremiah

    jstoddard@sdf.org
    SDF Public Access UNIX System - http://sdf.org

    I don't know if https://6.buric.co/airc.c.txt would be of any use but it's
    a pretty good and relatively simple implementation of the protocol (again,
    for MS-DOS, and using a different TCP stack).

    -uso.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jeremiah Stoddard@21:1/5 to Steve Nickolas on Sun Feb 5 22:46:17 2023
    On Sun, 5 Feb 2023, Steve Nickolas wrote:

    Date: Sun, 5 Feb 2023 12:21:51 -0500
    From: Steve Nickolas <usotsuki@buric.co>
    Newsgroups: comp.sys.apple2
    Subject: Re: Contiki IRC

    On Sat, 4 Feb 2023, Jeremiah Stoddard wrote:

    So, replying to myself:

    By the way, Contiki IRC doesn't seem to have the "msg" command implemented >>> (necessary for identifying oneself to libera.chat's NickServ).

    I glanced quickly at some information on the IRC protocol, and likewise
    took a quick look at the Contiki IRC source code. I think I have enough of >> an understanding to speculate that someone inexpert like myself could do
    this, and of how to approach the problem.

    I am quite familiar with the IRC protocol and have written a client for MS-DOS.


    Thanks for responding. It's good to know that there's an IRC expert of
    sorts here!

    The PRIVMSG command seems to be used both for private messages and for
    messages to channels. It is already implemented in Contiki in the latter
    context. I think "/msg" would need to send the same thing to the IRC
    server, just with the immediately following word (rather than a channel
    name) as the recipient.

    /msg NICK MESSAGE -> PRIVMSG NICK :MESSAGE


    That's exactly what my little hack to the Contiki IRC code did. Between
    your response and the fact that it worked, I'm quite pleased to know I
    seem to have been on the right track.

    I think a new "else if" section in the parse_line function under if(line[0] >> == '/'), to handle "msg" can take care of recognizing the command. I'll
    have to look a little closer at the data structures and existing functions: >> I don't know whether ircc_msg() can be used directly, or adapted to also
    handle this type of message, or if it would be better to add a new
    function, like ircc_privmsg()... Either way, the line entered by the user
    needs to be parsed a little extra to pull out the recipient before grabbing >> the rest as the message.

    I hope I'm not way off base here.

    -Jeremiah

    jstoddard@sdf.org
    SDF Public Access UNIX System - http://sdf.org

    I don't know if https://6.buric.co/airc.c.txt would be of any use but it's a pretty good and relatively simple implementation of the protocol (again, for MS-DOS, and using a different TCP stack).


    Oooh, thanks a million for pointing me to your MS-DOS implementation. I
    may be letting my tiny success go to my head, but I'm kind of sort of considering another project--this time from scratch--to see if it would be possible to put together an IRC client that works with those "Simple WiFi Modem" gadgets. Since the modem handles the TCP stuff, basically
    presenting a telnet connection to the serial port (Super Serial Card or equivalent), there might be a little more breathing room to make a client
    with a few more features. I dunno; I don't have any experience
    programming a Super Serial Card, either.

    Anyway, if I end up jumping into the crazy project, another
    implementation, even for another system, will probably be useful for
    reference.

    -uso.


    -Jeremiah

    jstoddard@sdf.org
    SDF Public Access UNIX System - http://sdf.org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Oliver Schmidt@21:1/5 to All on Mon Feb 6 07:37:34 2023
    Hi Jeremiah,

    I'm kind of sort of
    considering another project--this time from scratch--to see if it would be possible to put together an IRC client that works with those "Simple WiFi Modem" gadgets.

    Great idea! I'm considering the very same thing for the Contiki web
    browser.

    I dunno; I don't have any experience
    programming a Super Serial Card, either.

    When you hacked the Contiki IRC client, then you already know cc65. It
    comes with a driver for the Super Serial Card (that uses interrupts in
    contrast to the SSC firmware). For WiFi modems which support the hardware handshake on their serial port, that driver makes SSC programming super
    simple. See https://github.com/cc65/cc65/blob/master/samples/terminal.c

    Together with the cc65 CONIO interface for direct/fast screen access in 80
    col. mode (as it is i.e. used by the Contiki IRC client), you're pretty
    well equipped.

    Both interfaces (serial & screen) are btw. also available for the C64 and
    the ATARIs. You could pretty easily support all three machines with
    (almost) the same source code (just like the Contiki IRC client).

    Regards,
    Oliver

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Steve Nickolas@21:1/5 to Jeremiah Stoddard on Mon Feb 6 14:59:46 2023
    On Sun, 5 Feb 2023, Jeremiah Stoddard wrote:

    Thanks for responding. It's good to know that there's an IRC expert of sorts here!

    I've actually run an IRC network of my own since 2008.

    There is a difference between the software Freenode used to use and the software we use that causes some glitches because I made some assumptions around our ircd - implications regarding the presence or absence of a
    colon. I think it only affects JOIN.

    -uso.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jeremiah Stoddard@21:1/5 to Oliver Schmidt on Mon Feb 6 19:42:00 2023
    On Mon, 6 Feb 2023, Oliver Schmidt wrote:

    Date: Mon, 6 Feb 2023 07:37:34 -0000 (UTC)
    From: Oliver Schmidt <ol.sc@web.de>
    Newsgroups: comp.sys.apple2
    Subject: Re: Contiki IRC

    Hi Jeremiah,

    I'm kind of sort of
    considering another project--this time from scratch--to see if it would be >> possible to put together an IRC client that works with those "Simple WiFi
    Modem" gadgets.

    Great idea! I'm considering the very same thing for the Contiki web
    browser.

    That sounds awesome. BBSes are great, but it would be fantastic if there
    were a few other things to do with those WiFi modems, too.


    I dunno; I don't have any experience
    programming a Super Serial Card, either.

    When you hacked the Contiki IRC client, then you already know cc65. It
    comes with a driver for the Super Serial Card (that uses interrupts in contrast to the SSC firmware). For WiFi modems which support the hardware handshake on their serial port, that driver makes SSC programming super simple. See https://github.com/cc65/cc65/blob/master/samples/terminal.c

    Oh, cool. I guess I'm diving into cc65, then, rather then just getting my
    feet wet.


    Together with the cc65 CONIO interface for direct/fast screen access in 80 col. mode (as it is i.e. used by the Contiki IRC client), you're pretty
    well equipped.

    Both interfaces (serial & screen) are btw. also available for the C64 and
    the ATARIs. You could pretty easily support all three machines with
    (almost) the same source code (just like the Contiki IRC client).

    Neat! Maybe that will give me an excuse to get the old thrift store C64 working, finally.


    Regards,
    Oliver


    Thanks for the information. If I jump into this project, it will
    definitely be useful.

    -Jeremiah

    jstoddard@sdf.org
    SDF Public Access UNIX System - http://sdf.org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Colin Leroy-Mira@21:1/5 to All on Tue Feb 7 06:05:56 2023
    Hi,

    Oooh, thanks a million for pointing me to your MS-DOS implementation.
    I may be letting my tiny success go to my head, but I'm kind of sort
    of considering another project--this time from scratch--to see if it
    would be possible to put together an IRC client that works with those
    "Simple WiFi Modem" gadgets. Since the modem handles the TCP stuff,
    basically presenting a telnet connection to the serial port (Super
    Serial Card or equivalent), there might be a little more breathing
    room to make a client with a few more features. I dunno; I don't have
    any experience programming a Super Serial Card, either.

    Maybe it could interest you, it's not exactly a "simple wifi modem" as
    it has a protocol, but I'm in the process of making a serial/network
    proxy for my Apple //c. It allows connecting to arbitrary hosts/ports,
    does http(s), ftp(s), sftp, (that can be extended to whatever libCURL supports), and provides a few helpers (return a match in the
    response's body, parse JSON, convert images to HGR and send them.

    I'm using it to make a Mastodon client. You can find it at https://github.com/colinleroy/a2tools/tree/master/src

    (surl-server/ runs on a PC or Raspberry, client lib is in lib/surl*,
    code using it can be found in stp/, mastodon/, telnet/, and surl/)

    HTH!
    --
    Colin
    https://www.colino.net/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Colin Leroy-Mira@21:1/5 to All on Wed Feb 8 20:19:23 2023
    Hi,

    I just saw the video you linked on Facebook. The Mastodon client thing
    is pretty neat. I run a Misskey server, so maybe I should try to make
    a Misskey client with your proxy stuff. So many project ideas, such
    limited time, hahaha.

    Yes indeed! We should really get the civilization to the point of
    20-hours work-weeks. We'd have much more fun. :-)

    --
    Colin
    https://www.colino.net/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jeremiah Stoddard@21:1/5 to All on Wed Feb 8 19:16:31 2023
    Hi Colin,

    Maybe it could interest you, it's not exactly a "simple wifi modem" as
    it has a protocol, but I'm in the process of making a serial/network
    proxy for my Apple //c. It allows connecting to arbitrary hosts/ports,
    does http(s), ftp(s), sftp, (that can be extended to whatever libCURL supports), and provides a few helpers (return a match in the
    response's body, parse JSON, convert images to HGR and send them.

    I'm using it to make a Mastodon client. You can find it at https://github.com/colinleroy/a2tools/tree/master/src

    I just saw the video you linked on Facebook. The Mastodon client thing is pretty neat. I run a Misskey server, so maybe I should try to make a
    Misskey client with your proxy stuff. So many project ideas, such limited
    time, hahaha.

    -Jeremiah

    jstoddard@sdf.org
    SDF Public Access UNIX System - http://sdf.org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)