Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardise marking users as bots #43

Closed
jesopo opened this issue May 15, 2019 · 26 comments
Closed

Standardise marking users as bots #43

jesopo opened this issue May 15, 2019 · 26 comments

Comments

@jesopo
Copy link

jesopo commented May 15, 2019

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.

  • UnrealIRCd (usermodes/bot module)
  • InspIRCd (botmode module)
  • ChatIRCd
  • Nefarious

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
Copy link
Author

jesopo commented May 15, 2019

the bot-url proposal is documented at ircv3/ircv3-specifications#336

@SadieCat
Copy link

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
Copy link
Author

jesopo commented May 15, 2019

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

@jesopo
Copy link
Author

jesopo commented May 15, 2019

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

@SadieCat
Copy link

... 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
Copy link
Author

jesopo commented May 15, 2019

Then I'd propose standardisation as....

  • BOTMODE=B in ISUPPORT
  • bot message tag (e.g. @bot;account=BitBot :BitBot!user@host PRIVMSG #test :test)

@jesopo
Copy link
Author

jesopo commented May 15, 2019

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
Copy link
Member

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
Copy link
Author

jesopo commented May 15, 2019

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

@AlMcKinlay
Copy link

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
Copy link
Author

jesopo commented May 15, 2019

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

@DarthGandalf
Copy link
Member

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
Copy link
Author

jesopo commented May 15, 2019

The most agreed upon seems to be...

  • bot metadata key with any value. likely this value will be hardcoded to the bot's software (e.g. bot=BitBot)
  • when a bot metadata key and a "homepage" key is present, use the "homepage" key as what we would have used bot-url for

@k4bek4be
Copy link

k4bek4be commented Jun 6, 2020

Let's sum it up.
Current solutions are:

  • The bot setting +B user mode for itself. The server has no way to advertise support of this umode to clients.
  • The inspircd.org/bot tag appended to all actions (messages etc) done by the user with +B set.
  • The B flag in WHO output.
  • The 335 numeric in WHOIS reply for users with +B set (probably Unreal only).
  • The bot-url metadata key, with value URL providing more info for the bot.
  • The bot metadata key, with the bot name as a value. This also changes the homepage key meaning to be equal to bot-url.

The proposals are:

  • Mark the bot mode in isupport, for example BOT=B, and require bots to set it if advertised.
  • Add the bot message tag to all messages and actions by users marked with the BOT flag.
  • Require bots to set relevant metadata if both the bot and the server support it.

We may consider also:

  • Standarize the whois bot information.
  • Auto-set the bot mode for clients setting any of the bot metadata (so whois and message tag will work).
  • Maybe auto-set the bot metadata key if the client sets the bot mode, only allowing the client to change the value to its own?

@jesopo
Copy link
Author

jesopo commented Jun 6, 2020

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
Copy link

k4bek4be commented Jun 6, 2020

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
Copy link

SadieCat commented Jun 6, 2020

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
Copy link
Author

jesopo commented Jun 6, 2020

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 -

  • existing users in channels we join
  • users joining with the mode set
  • users setting the mode after join

@k4bek4be
Copy link

k4bek4be commented Jun 6, 2020

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
Copy link

SadieCat commented Jun 6, 2020

inspircd/inspircd@31815ed

@syzop
Copy link

syzop commented Jun 7, 2020

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
Copy link

SadieCat commented Jun 7, 2020

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 added a commit to unrealircd/unrealircd that referenced this issue Jun 8, 2020
@syzop
Copy link

syzop commented Jun 8, 2020

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 🤦

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

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

Adam- pushed a commit to ircd-hybrid/ircd-hybrid that referenced this issue Dec 3, 2020
…ircv3/ircv3-ideas#43

git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/trunk@9781 82007160-df01-0410-b94d-b575c5fd34c7
Adam- pushed a commit to ircd-hybrid/ircd-hybrid that referenced this issue Dec 3, 2020
…ircv3/ircv3-ideas#43

git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.2.x@9780 82007160-df01-0410-b94d-b575c5fd34c7
@DanielOaks
Copy link
Member

DanielOaks commented Feb 25, 2021

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
Copy link

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

@DanielOaks
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants