View Issue Details

IDProjectCategoryView StatusLast Update
0006090unrealircdpublic2022-05-13 08:15
Reporterarmyn Assigned Tosyzop  
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status closedResolutionno change required 
Product Version6.0.3 
Summary0006090: No unrealircd.org/json-log for message/notice
DescriptionHi

I found that there is no unrealircd.org/json-log for messages and notices
Are you going to wear it one day? with at least the realname, the realname is just missing!
This is to avoid listening to raws/await/async in JavaScript/IRC-framework to have everything directly at once!

Cdt
TagsNo tags attached.
3rd party modules

Activities

syzop

2022-04-15 19:02

administrator   ~0022453

Do you mean logging of user and channel messages from other users, sending them to all ircops as snomasks or log file? Because no, that will never be in UnrealIRCd.

Or do you mean something else?

syzop

2022-04-15 19:31

administrator   ~0022454

Or do you just want a realname tag in ordinary messages/notices? (so nothing to do with snomasks or logging)

armyn

2022-04-15 20:58

reporter   ~0022455

@syzop as for the snotice of "connect.LOCAL_CLIENT_DISCONNECT" :

  tags: {
    'unrealircd.org/json-log': '{}'
  },

Add realname only for privmsg/notice, example:

  tags: {
    'unrealircd.org/json-log': '{realname: "..."}'
  },

Only the realname is the most important.

Would it be useful for other people who use "json-log" ?!

it would be useful to retrieve the realname because that way no need to make a new request on a raw who and wait for the response with an await/asynchronous (in js)

I created a small channel statistics robot yesterday, it does this scenario:
1) the robot is present on official channels
2) each time a person is seen on a channel (message) then it retrieves this to save it in sql: channel, nick, hostname, ident, and especially account (if it exists or not), it saves only once, if the user writes a second time, then it does not save.
3) and so I can compare to see the metas for example how many unique accounts are talking every day on a channel, or in noaccount.

In N° 2 it is possible to retrieve everything: nick, channel, ident, hostname, but the realname does not exist, only the "log json" can do that. However the realname was still created from an await/async on the raw who.
I noticed that the realname must very often be retrieved via the "privmsg" sent in the channels, so if it would be directly in the "json log" there would be no need to create await/async with a raw who every time

syzop

2022-04-16 08:28

administrator   ~0022456

Last edited: 2022-04-16 08:28

Ah OK, i misunderstood. It is already there:

  "client": {
    "name": "c6667",
    "id": "00127QW05",
    "hostname": "localhost",
    "ip": "127.0.0.1",
    "server_port": 6667,
    "client_port": 55054,
    "details": "c6667!~x@localhost",
    "connected_since": "2022-04-16T06:19:10.000Z",
    "user": {
      "username": "~x",
      "realname": "this is the realname", <==========
      "servername": "maintest.test.net",
      "reputation": 0,

It is nested under "client" -> "user", so it is client.user.realname and not client.realname, maybe that is why you missed it.

Is that what you need? :)

If I misunderstood again or if you need something else, let us know.

armyn

2022-04-16 10:50

reporter   ~0022457

Ah ok I had probably missed it, I really don't see it but for the joins/quits I see it.
Do you have to activate something in particular to see it?

syzop

2022-04-16 16:33

administrator   ~0022458

Can you tell me for which snotice types you are missing client.user.realname? And can you double check first?
The client expansion routines always expand the same way, so there shouldn't be a difference between the different events.

armyn

2022-04-17 02:51

reporter   ~0022459

Hi

Example for the current situation for type privmsg :

<Hinat> !go
{
  type: 'privmsg',
  from_server: false,
  nick: 'Hinat',
  ident: 'o-actPHRjTeQu4c-2',
  hostname: 'dis-94A0CF4C.cloud-65c970.irccity.com',
  target: '#games',
  group: undefined,
  message: '!go',
  tags: {
    'unrealircd.org/userhost': '....',
    'unrealircd.org/userip': '....',
    account: 'Hinat',
    msgid: 'hCRs92edJOGLk1JTRpGHXV',
    time: '2022-04-17T00:46:53.804Z'
  },
  time: 1650156413804,
  account: 'Hinat',
  batch: undefined,
  reply: [Function (anonymous)]
}


It should be like this adding the realname:

<Hinat> !go
{
  type: 'privmsg',
  from_server: false,
  nick: 'Hinat',
  ident: 'o-actPHRjTeQu4c-2',
  hostname: 'dis-94A0CF4C.cloud-65c970.irccity.com',
  target: '#games',
  group: undefined,
  message: '!go',
  tags: {
'unrealircd.org/json-log': '{realname: "<name>"}' // this
    'unrealircd.org/userhost': '....',
    'unrealircd.org/userip': '....',
    account: 'Hinat',
    msgid: 'hCRs92edJOGLk1JTRpGHXV',
    time: '2022-04-17T00:46:53.804Z'
  },
  time: 1650156413804,
  account: 'Hinat',
  batch: undefined,
  reply: [Function (anonymous)]
}

armyn

2022-04-17 02:53

reporter   ~0022460

I can't look at the structure of the raw for my AdiIRC, because it doesn't read any "unrealircd.org/json-log" but irc-framework does, it's above

syzop

2022-04-17 08:44

administrator   ~0022461

unrealircd.org/json-log is only used for logging messages in JSON format (hence the name), the stuff that IRCOps receive via server notices (snomasks).

So then we are back at my 2nd comment: "Or do you just want a realname tag in ordinary messages/notices? (so nothing to do with snomasks or logging) "
You could ask a 3rd party module coder for that. I don't see it being useful in UnrealIRCd itself, as it is a waste of bandwidth to send it in every message.

armyn

2022-04-17 13:25

reporter   ~0022462

ah ok then it does not matter I will use a listen on a raw with await / async / promise

Issue History

Date Modified Username Field Change
2022-04-15 18:31 armyn New Issue
2022-04-15 19:02 syzop Note Added: 0022453
2022-04-15 19:31 syzop Note Added: 0022454
2022-04-15 19:32 syzop Status new => feedback
2022-04-15 20:58 armyn Note Added: 0022455
2022-04-16 08:28 syzop Note Added: 0022456
2022-04-16 08:28 syzop Note Edited: 0022456
2022-04-16 10:50 armyn Note Added: 0022457
2022-04-16 16:33 syzop Note Added: 0022458
2022-04-17 02:51 armyn Note Added: 0022459
2022-04-17 02:53 armyn Note Added: 0022460
2022-04-17 08:44 syzop Note Added: 0022461
2022-04-17 13:25 armyn Note Added: 0022462
2022-05-13 08:15 syzop Assigned To => syzop
2022-05-13 08:15 syzop Status feedback => closed
2022-05-13 08:15 syzop Resolution open => no change required