QLirc IRC Chat Client

Anything QL Software or Programming Related.
User avatar
dilwyn
Mr QL
Posts: 2761
Joined: Wed Dec 01, 2010 10:39 pm

Re: QLirc IRC Chat Client

Post by dilwyn »

Ralf R. wrote:Any news from Dilwyn? Would be nice for me to try this (for the first time) with QPC2.
I was online using QLirc last night and in the entire time I was online, it crashed once and a few minor niggles and bugs - I'm aiming for an alpha release by Friday (without documentation other than what Tim has provided). It won't be stabl;e enough for a proper release, but hopefully sufficiently usable that people can try it and report back on bugs etc.

Tim has described his version as a ""demo release"" but in reality it works enough to get online for just simple QLForum online chat with short messages.

I'm at the stage of adding some of the common '/commands' such as /me and /away and so on, and adding CTCP commands (without DCC yet). Only a subset of /commands so far.

There are still some restrictions - the entry editor is quite basic, you can only type and ctrl-left to delete, can't cursor back in a line.

I still need to add UTF-8 character set support. Norman Dunbar has kindly provided me with code I can adapt.

There's currently a significant duplication of code within the program, but many routines can share a lot of code, so that will need to be done.

Still some work to do to make it more configurable and customisable. At the moment, the transition to a general IRC client is only half done, so it can still only be used with QL Forum. You can specify origin where it starts on screen, but can't move it once started (yet).

Not pointer driven - that will be a later version.

The error trapping leaves a bit to be desired, and there's only partial handling of the dozens of message codes IRC can send you.

No handling of smileys yet, although I've worked out how it could be done.

One thing you'll need to be aware of is that before starting on this, I knew nothing about Internet Relay Chat (IRC). So I am fully expecting to get put right on a number of things and have to make lots of changes. But that's alpha releases.

EDIT: I haven't yet added the "scroll back through previous lines" facility someone (badaman?) requested. Worked out a possibhle way to do it, but will need some work to implement.


User avatar
RalfR
Aurora
Posts: 872
Joined: Fri Jun 15, 2018 8:58 pm

Re: QLirc IRC Chat Client

Post by RalfR »

Thank you, that sounds good. I'm already looking forward to it.


4E75 7000
User avatar
RalfR
Aurora
Posts: 872
Joined: Fri Jun 15, 2018 8:58 pm

Re: QLirc IRC Chat Client

Post by RalfR »

I have run that under QPC 2, put in my nickname but there was just the string "Connecting", nothing else.
swensont wrote:The latest project that I have been working on in a IRC Chat client that runs on SMSQ/E with QPCII and SMSQmulator. QLirc is a minimal IRC chat client that is hard-coded to access the #QLforums. It is a small SuperBasic program (about 4K) that will connect to #QLforums and let the user send and receive chat messages. It will show all users that are connected to Chat. It can be found on my web page:

swensont.epizy.com

I and one other person has tested it and we think it is ready for the general public. The zip file contains the _ssb source file, the _bas program and the _doc documentation.

I did this mostly as a proof of concept and a fun project to do. Hopefully others will find it useful.

Tim Swenson


4E75 7000
User avatar
dilwyn
Mr QL
Posts: 2761
Joined: Wed Dec 01, 2010 10:39 pm

Re: QLirc IRC Chat Client

Post by dilwyn »

Ralf R. wrote:I have run that under QPC 2, put in my nickname but there was just the string "Connecting", nothing else.
It does sometimes happen and all you can do is reconnect. I even get this sometimes just connecting to the Forum itself in an ordinary browser and I have to try 2 or 3 times.

Have a look at the IRC server name details in line 440, where it sends the USER info, this MAY need changing for your country if you can't access the server named - you can look up on the internet the preferred connection. It seems to work OK here, and it worked for Tim in USA.

This is one of the issues holding up release of QLirc2, trying to work out solutions to issues like this. The lack of clear documentation and above all examples of use of what is after all pretty old technology nowadays is slowing me down somewhat.

Doesn't help I made the mistake of letting it be known I had extra time at home this week and got bombarded with "as you're at home can you just do this..." type messages.


User avatar
dilwyn
Mr QL
Posts: 2761
Joined: Wed Dec 01, 2010 10:39 pm

Re: QLirc IRC Chat Client

Post by dilwyn »

Perhaps I should have added the definition of the USER command according to RFC2812, the standard I am working from for QLirc2. You will see it differs slightly from the format Tim used.

There is also a minor issue in that the early demo doesn't check if a nickname is in use already for that channel, in which case the server may return a numeric notice 462 which you can check to go back to re-enter. The USER command can also return 461 if you get the parameters wrong.

USER <user> <mode> <unused> <realname>

<user> is your nickname for IRC chat, e.g. "ralfr" without the quotes

<mode> is a numeric bitmask. If bit 2 is set, user mode "w" (user receives wallops) is set and if bit 3 is set, user mode "i" is set (invisible).

<unused> may be a * to indicate unused

<realname> would be the real name of the user logged on:

Examples, printed to the tcp channel #3 in the demo, in lines ending with carriage return then linefeed:

USER joe 0 * :Ronald Reagan
user with nickname "joe", no wallops, not invisible, * where the unused part is, and real name of Ronald Reagan.

USER fred 8 * :Ronald Reagan
user with nickname "fred", asking to be set invisible, real name Ronald Reagan.

Later revisions of IRC spec allow one or two extra parameters, probably why Tim added the irc.mibbit.net part. I need to investigate this further.

A lot of this is well documented online but almost no examples at all, which is why Tim and I have had to resort in some cases to log output of other programs to clarify if the documentation should be interpreted this way or that way.
Last edited by dilwyn on Sat Mar 21, 2020 2:06 pm, edited 1 time in total.
Reason: corrected definition of <unused>


User avatar
RalfR
Aurora
Posts: 872
Joined: Fri Jun 15, 2018 8:58 pm

Re: QLirc IRC Chat Client

Post by RalfR »

dilwyn wrote:Have a look at the IRC server name details in line 440, where it sends the USER info, this MAY need changing for your country if you can't access the server named...
I see, but having absolutely no knowledge about that, perhaps someone from DE (tofro?) is able to give me a hint or was successfull in using it.

Nevertheless, thank you for the detailed information.


4E75 7000
User avatar
dilwyn
Mr QL
Posts: 2761
Joined: Wed Dec 01, 2010 10:39 pm

Re: QLirc IRC Chat Client

Post by dilwyn »

Ralf R. wrote:
dilwyn wrote:Have a look at the IRC server name details in line 440, where it sends the USER info, this MAY need changing for your country if you can't access the server named...
I see, but having absolutely no knowledge about that, perhaps someone from DE (tofro?) is able to give me a hint or was successfull in using it.

Nevertheless, thank you for the detailed information.
Are you able to get online using either the "official" online chat link from QL Forum, using Mibbit/Kiwi irc in your browser?

It would help identify exactly where it goes wrong if you print the line number between each line in that part of the program from line 390 onward (the OPEN#3,"tcp_chat.qlforum.co.uk:6667" line) up to about line 790 where it says "Joined #QLforum". That would help me identify exactly which command is going wrong and locking up. The 6667 is the port number for unencrypted original IRC.

One change you could try - I tested it while online last night - is to line 440, the USER line. Change it to this, to conform with the RFC:

Code: Select all

440 PRINT #3,"USER "&name$&" 0 * :ralf rekoendt"&chr$13)&chr$(10)&chr$(13)
Anyone else trying this out, the QLirc demo has only been tested on QPC2 and SMSQmulator. Untested on QemuLator and thought not to work on uQLx. It definitely won't work on a BBQL.


User avatar
RalfR
Aurora
Posts: 872
Joined: Fri Jun 15, 2018 8:58 pm

Re: QLirc IRC Chat Client

Post by RalfR »

dilwyn wrote:
Ralf R. wrote:

Code: Select all

440 PRINT #3,"USER "&name$&" 0 * :ralf rekoendt"&chr$13)&chr$(10)&chr$(13)
Ah, I see. Perhaps it is a problem, because my nickname is "ralf r." with a space?

440 PRINT #3,"USER "&name$&" 0 * :ralf rekoendt"&chr$13)&chr$(10)&chr$(13)

gives a syntax error...


4E75 7000
User avatar
RalfR
Aurora
Posts: 872
Joined: Fri Jun 15, 2018 8:58 pm

Re: QLirc IRC Chat Client

Post by RalfR »

Even that does not work:
Chat.JPG


4E75 7000
User avatar
dilwyn
Mr QL
Posts: 2761
Joined: Wed Dec 01, 2010 10:39 pm

Re: QLirc IRC Chat Client

Post by dilwyn »

Ralf R. wrote:
dilwyn wrote:
Ralf R. wrote:

Code: Select all

440 PRINT #3,"USER "&name$&" 0 * :ralf rekoendt"&chr$13)&chr$(10)&chr$(13)
Ah, I see. Perhaps it is a problem, because my nickname is "ralf r." with a space?

440 PRINT #3,"USER "&name$&" 0 * :ralf rekoendt"&chr$13)&chr$(10)&chr$(13)

gives a syntax error...
Yes, user nicknames cannot have a space. Keeping it to alphanumerics only is safest.
Missing left bracket between CHR$ and 13 causes the syntax error - my keyboard keeps dropping random characters as I type from time to time (bad workman blames his tools!)


Post Reply