ircv3 / ircv3-ideas

46 stars 3 forks source link

Standardise marking users as bots #43

Closed jesopo closed 3 years ago

jesopo commented 5 years ago

Simple enough concept. I think we should standardise a way to mark a "user" as a bot.

I've found 4 IRCds within the IRCv3 support tables that offer this as a +B usermode.

I'm not sure if trying to standardise around this umode is a good idea - umodes are dwindling and we can't just assume that all servers support +B as "I am a bot".

From @jwheare via IRC...

<@jwheare> re bot denotation, I’m using a bot-url metadata key for that in our slack gateway
<@jwheare>  With the assumption that all bots have urls

I, personally, would be very pleased with standardisation of bot denotation through metadata.

jesopo commented 5 years ago

the bot-url proposal is documented at https://github.com/ircv3/ircv3-specifications/issues/336

SadieCat commented 5 years ago

InspIRCd v3 currently sends the inspircd.org/bot tag on all messages from users with the B (bot) user mode enabled to users with the message-tags cap enabled.

I'm not sure if trying to standardise around this umode is a good idea - umodes are dwindling

We don't really have a shortage of user modes.

we can't just assume that all servers support +B as "I am a bot".

User mode B as bot is the only use of that character according to the ircdocs mode list but we could always do what it done with callerid/banexception and give the mode an ISUPPORT token if its really necessary.

jesopo commented 5 years ago

In which case I'm happy with either a metadata key, a message tag or an ISUPPORT token for +B.

jesopo commented 5 years ago

... scratch that. +B would only make bot status apparent to the server, not other users.

SadieCat commented 5 years ago

... scratch that. +B would only make bot status apparent to the server, not other users.

Which is why we apply a message tag to messages from bots.

jesopo commented 5 years ago

Then I'd propose standardisation as....

jesopo commented 5 years ago

however...

<e> what if you want to identify bots in a userlist or sth that haven't spoken yet
<jesopo> bot-url
<jesopo> in which case why do we have a tag at all
DarthGandalf commented 5 years ago

One data point: since many years ago KVIrc supports "bot" flag via hidden characters in beginning of real name. When it detects that flag, it shows an icon in the nick list. Here's a sample implementation of that protocol: https://github.com/DarthGandalf/znc/blob/dgmods/modules/kvirc.cpp#L22

It's somewhat closer to client tags (e.g. @+bot), since it doesn't require special support on server side.

bot-url

It implies/requires that every bot has some URL. Sometimes a bot is not open source, and not documented, but still a bot. Perhaps for such cases a boolean metadata flag would be useful.

jesopo commented 5 years ago

perhaps a bot metadata key (e.g. bot=1 or bot=true etc) that is complemented by bot-url

AlMcKinlay commented 5 years ago

Sometimes a bot is not open source, and not documented, but still a bot.

Personally, I think that if you build a bot, you should at the very least have a simple webpage that explains what the bot is for. I think that people building bots (myself included) have a duty to make it clear what they do. I don't think it's a bad thing to require that. It'll better us all.

jesopo commented 5 years ago

I believe demanding that IRC bots have a webpage is out of scope for IRCv3.

DarthGandalf commented 5 years ago

I don't think it's a bad thing to require that.

Theoretically, I agree with you. But some bots are written only for a specific channel and not for general consumption. OTOH, they probably wouldn't benefit too much from having the bot marker.

jesopo commented 5 years ago

The most agreed upon seems to be...

k4bek4be commented 4 years ago

Let's sum it up. Current solutions are:

The proposals are:

We may consider also:

jesopo commented 4 years ago

usermode isn't good enough - can't see other people's umodes. whois isn't good enough - can't whois every user (think 2k user channel)

k4bek4be commented 4 years ago

The purpose of the usermode is to make other things (message tag and whois) work. And whois reply may be useful for manually querying users, for example with some legacy clients not supporting anything else.

SadieCat commented 4 years ago

I've had a local commit which adds 005 BOT as well as a 'B' flag for WHO to InspIRCd for a while now. I'll push it now.

jesopo commented 4 years ago

i would be very grateful if we could end up covering all the bases in the same way we do with extended-join + account-notify + whox for accounts -

k4bek4be commented 4 years ago

I think the ultimate solution for such problems would be to use metadata. But i don't think metadata will be universally supported any time soon.

SadieCat commented 4 years ago

https://github.com/inspircd/inspircd/commit/31815edd6a6b98434bace5359234d2b47397ee0a

syzop commented 4 years ago

I like what @SadieCat is doing with the inspircd.org/bot tag (sending this when +B). The 005 BOT token looks like a good idea as well. On the UnrealIRCd-side I believe @k4bek4be already wrote an UnrealIRCd module for the bot tag and I wouldn't mind integrating it in official UnrealIRCd as well, it is very easy to add. I think with something as simple as this you will get a lot of support for this, @jesopo. And, yeah, of course if this would be approved then it should be an IRCv3 tag and no longer a vendor tag.

@SadieCat: Just a small question. I like showing B in WHO too, why not. But.. this BOT=B token that you are proposing for 005 ISUPPORT. The B here... does it refer to the user mode or to the WHO letter. I mean, it is both capital B for InspIRCd and it is or will be in UnrealIRCd as well, but.. can we say that is always the case? Maybe there is an IRCd where it currently is not, or maybe there is an IRCd currently without a bot mode that already has umode B taken. Maybe it is not an issue but well... just something to think about :)

SadieCat commented 4 years ago

this BOT=B token that you are proposing for 005 ISUPPORT. The B here... does it refer to the user mode or to the WHO letter.

User mode, the same as with other tokens (e.g. CALLERID).

syzop commented 4 years ago

Just a slight correction of what I wrote earlier... we already put B in WHO flags (since 2004 apparently). I was just looking at the wrong place :facepalm:

User mode, the same as with other tokens (e.g. CALLERID).

Sounds good to me. I have now added the token to UnrealIRCd.

DanielOaks commented 3 years ago

We've got consistency around this with the BOT isupport token, WHO flags and WHOIS entry across a decent number of servers. I might write up a spec that just documents how existing implementations of that work and PR it, will link here.

SadieCat commented 3 years ago

@DanielOaks We also have an inspircd.org/bot tag on messages that would be neat to have standard.

DanielOaks commented 3 years ago

With https://github.com/ircv3/ircv3-specifications/pull/439 merged and mostly defining existing behaviour, I think we can close this issue. Thanks for pushing on this, all!