mIRC Home    About    Download    Register    News    Help

Print Thread
Proposal: draft/external-reg #270039 17/03/22 04:41 PM
Joined: Feb 2022
Posts: 4
V
Valware_ Offline OP
Self-satisfied door
OP Offline
Self-satisfied door
V
Joined: Feb 2022
Posts: 4
Hello there.

I would like to propose adding native compatibility for draft/external-reg


Reason

For IRC servers to indicate to the connecting client, using an ISUPPORT token, that the registration method is external to IRC, presenting a webpage as a parameter.

The service which provides SASL must be responsible for setting the link in the ISUPPORT list.

The client should display a confirmation modal, asking the user if they would like to register via the link.
Afterwards, the client should display a user+pass modal in order for the user to input the details they just entered into the website, in order to save them as SASL credentials for that server.

Concept code:

ISUPPORT token is displayed like
Code
draft/external-reg=https://valware.uk/register
or
Code
external-reg=https://valware.uk/register


[Linked Image from valware.uk]

Code
RAW *:*:{
  %str = $chr(42) LS
  if ($1-2 == %str) {
    %string = $1-
    %i = 0
    while (0 == 0) {
      tokenize 32 %string
      if (external-reg isin $1) {
        %extreglink = $gettok($1,2,61)
        open_reg_link_dialog $server %link
        break
      }
      else {
        if (!$2) { break }
        %string = $2-
        tokenize 32 %string
      }
    }
  }
}
dialog reg_link_dialog {
  title This IRC server is asking to use a webpage to register an account
  option dbu
  size -1 -1 300 100

  text "", 1, 5 5 240 20
  text "Only click 'Open' if you trust this server and would like to open the website it's asking you to register on.", 2, 5 20 260 10
  text "Would you like to continue and open the webpage?", 6, 5 65 150 14
  text "The webpage this server is asking you to visit is:", 4, 5 35 150 10
  edit "", 5, 5 45 270 13

  button "Open", 10, 100 85 40 10, close
  button "Cancel", 11, 160 85 40 10, default close
}
on *:DIALOG:reglink_*:*:*:{
  if ($devent == init) { did -a $dname 1 %reglinknet is asking you to register using a webpage. | did -a $dname 5 %extreglink | did -m $dname 5 }
  if ($devent == sclick) && ($did == 10) { run %extreglink | dialog -x $dname }
  if ($devent == sclick) && ($did == 11) { dialog -x $dname }
  if ($devent == close) { unset %extreglink }
}

alias open_reg_link_dialog {
  if ($server($1).methodpass) { return }
  set %reglinknet $1
  if ($dialog(reglink_ $+ $1)) { return }
  dialog -m reglink_ $+ $1 reg_link_dialog 
}


IMPORTANT:
This concept is put into effect, if you would like to demo the functionality using the code and aforementioned server.
So far it does not contain a modal for inputting credentials.

Re: Proposal: draft/external-reg [Re: Valware_] #270040 17/03/22 08:43 PM
Joined: Feb 2003
Posts: 2,803
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,803
I am just a little confused though. Why should it be necessary to use HTTP in order to access IRC, which has been around twice as long as the former, and shall be around long after HTTP becomes obsolete? Can't all of this be done from within IRC as a self-contained service without playing unnecessary homage to "The Web"?


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: Proposal: draft/external-reg [Re: Valware_] #270041 17/03/22 11:12 PM
Joined: Feb 2022
Posts: 4
V
Valware_ Offline OP
Self-satisfied door
OP Offline
Self-satisfied door
V
Joined: Feb 2022
Posts: 4
s/ISUPPORT/CAP (capability)/

Re: Proposal: draft/external-reg [Re: Raccoon] #270225 02/05/22 02:53 PM
Joined: Feb 2022
Posts: 4
V
Valware_ Offline OP
Self-satisfied door
OP Offline
Self-satisfied door
V
Joined: Feb 2022
Posts: 4
Sorry, I'd only just seen your message.

Why should it be necessary to ise HTTP in order to access IRC

Because the browser has been around half as long and has had a billion more advancements. This is a small part of an effort to provide server administrators with the option to delegate their registration process to a website..

This could be for a number of reasons, including things like the host wanting to truly customise the registration process and have it exactly how they like. You can very easily, with much user friendliness, do things like upload a profile photo which, if their client supports it, can also be their IRC avatar (dw METADATA spec rewrite underway). Also, whenever anyone is told to sign up to anywhere outside of IRC circles, everyone is very used to "we sign up on websites".

Aside from this, there is Anope services which provides an optional webpanel for user registration, and DALEK which provides straight up full wordpress integration, where the registration form for the network lives.