View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006213||unreal||ircd||public||2023-01-12 19:54||2023-01-14 16:00|
|Status||closed||Resolution||no change required|
|Summary||0006213: The realname is not in message tags when receiving a privmsg|
|Description||Everything is mentioned in the subject. There is all the data but only the realname is missing.|
The realname is very useful to retrieve the age and gender of the person sending a message to the bot in a very direct way, without going through any other raw/async/await and all that.
Is this an oversight?
|Tags||No tags attached.|
|3rd party modules|
The realname is available under user.username, see https://www.unrealircd.org/docs/JSON_logging#client_object under "client.user object".
But you talk about privmsg. There is no logging of messages in unrealircd, so you must mean something else, and possibly not json logging at all? :)
ah yes indeed there is no "log json" for the privmsg, I always confuse with the "raw view" of the irc-framework
reply: [Function (anonymous)]
It's just a shame that there isn't a ready-made variable for the realname, each time I have to go through another raw with asynchronous/await
Technically there is no way to put a realname variable in "tags"?
Right, I think you mean message tags. I don't think that is useful to the general UnrealIRCd community. I mean, in normal circumstances, it is rather a waste of unnecessary data.
It can be done in a 3rd party module. It would be relatively easy to make a message tag that is automatically added that includes the realname.
You could copy src/modules/account-tag.c for inspiration, then replace the IsLoggedin() check with an IsUser(), replace the safe_strdup(m->value, client->user->account); with safe_strdup(m->value, client->info);
And mass replace all the "account" words to "realname" (and "ACCOUNT" to "REALNAME").
|2023-01-12 19:54||armyn||New Issue|
|2023-01-13 07:46||syzop||Note Added: 0022704|
|2023-01-13 07:46||syzop||Assigned To||=> syzop|
|2023-01-13 07:46||syzop||Status||new => feedback|
|2023-01-13 21:29||armyn||Note Added: 0022705|
|2023-01-14 15:51||syzop||Summary||The realname is not displayed in JSON logging when receiving a privmsg => The realname is not in message tags when receiving a privmsg|
|2023-01-14 16:00||syzop||Status||feedback => closed|
|2023-01-14 16:00||syzop||Resolution||open => no change required|
|2023-01-14 16:00||syzop||Note Added: 0022711|