pirc-pl / unrealircd-modules

8 stars 2 forks source link

Metadata spec issues #18

Open westor7 opened 2 years ago

westor7 commented 2 years ago

Hello,

I am trying to use the metadata module to create a client code to be able to use it but there are some things that seems not clear and maybe they are bugs.

Items:

  1. When using SET for self the 762 doesn't sending at all on the end.
  2. When client1 using SET for self then server sending also the nick!ident@host on METADATA data to inform subs.
  3. Same as number 2 when trying to UNSET a key, it keeps sending nick!ident@host extra info.
  4. It seems that when using GET it should also send 762 on ending to indicate the ending of metadata, but this seems lacking of spec support.

Examples:

  1. METADATA * SET test-key :test value irc.server.tld 761 nickname nickname test-key * :test value MISSING: irc.server.tld 762 nickname :end of metadata

  2. client1: METADATA * SET avatar :https://i.imgur.com/ID.png client1: irc.server.tld 761 nickname nickname avatar * :https://i.imgur.com/ID.png client2: nickname!ident@7CA81BA6.E2EFF30D.D9C66EFA.IP METADATA nickname avatar * :https://i.imgur.com/ID.png SHOULD BE?: METADATA nickname avatar * :https://i.imgur.com/ID.png

  3. client1: METADATA * SET avatar client1: irc.server.tld 761 nickname nickname avatar * : client2: nickname!ident@7CA81BA6.E2EFF30D.D9C66EFA.IP METADATA nickname avatar * SHOULD BE?: METADATA nickname avatar * OR SHOULD BE?: nickname!ident@7CA81BA6.E2EFF30D.D9C66EFA.IP METADATA nickname avatar * : and METADATA nickname avatar * :

Notes:

I am not 100% sure for number 2 and 3 according to https://ircv3.net/specs/core/metadata-3.2.html seems they specifying that by sending nick!ident@host info when using SET for a channel, but they don't saying anything for self SET. User sets metadata on a channel: :user1!~user@somewhere.example.com METADATA #example url * :http://www.example.com

ValwareIRC commented 2 years ago

Hi, just dropping in to let you know that there is currently effort being put in to redesign the METADATA spec so probably a good idea to hold out changing anything for now until the new proposal lands

k4bek4be commented 2 years ago

For 1 and 4, i think it's a bug and it will be fixed. Does it create any immediate issues?

2 and 3 is intentional. The spec does not say what to do in this case, so i chose to send notification.

We don't know when will the new proposal come out (it's taking some 2 years already), and it will probably take much more time for it to be supported by any mainstream software. So i think we should keep this module updated, and eventually make a new "testing" one when a new draft spec is out.

Regarding the METADATA nickname avatar * and METADATA nickname avatar * :https://i.imgur.com/ID.png reply, it would make sense when the server is originating that change. Messages with no source are said to be coming from whatever is directly at the other end of a connection, so for clients it's always their host server. It makes sense to include the client itself as the source as it really is what have originated the change

westor7 commented 2 years ago

Also i found one more issue that when you are an IRCop you cannot use SET - CLEAR on a #channel or a nickname using override.. i don't know if this is by design but seems IRCops cannot set/unset/clear any targets.

k4bek4be commented 10 months ago

A new version, redone to the current spec, is here: https://github.com/pirc-pl/unrealircd-modules/blob/master/unreal6/metadata-2.c Please use this for your testing. It will be added to -contrib at some point.

For now, there is no moderation, including changing user metadata by opers.