Hi, dual-pronged question. I’m working on modifying Eggdrop to work better with Twitch. According to the docs
:jtv MODE #<channel> +o <user>
is the prototype used to detect mode changes.
Question 1: Is this a notification-only message, or should IRC clients be able to send those MODE changes themselves, ie if the bot wants to grant (or take) moderator status to a user?
Question 2: Giving moderator status to a user via the web interface does not generate a MODE message from the server for me. I have all the CAP features enabled, so I would expect to be able to see it:
[@] :tmi.twitch.tv CAP * ACK :twitch.tv/commands twitch.tv/membership twitch.tv/tags
Can anyone confirm they are able to still see MODE changes via the IRC interface, and if they are able to send (not just read) those messages? If so… any thoughts on why I can’t? Thank you.
Generally these messages are batched up so they don’t occur instantly.
Secondly, they don’t work at all in channels with 1k+ people present (even with the cap on) and is generally considered unreliable.
The correct method is to test for the presence of the moderator badge in tags -> bages
Worth nothing that whilst TMI (Twitch messaging interface) looks like IRC, it isn’t it just implements parts of IRC and uses the IRC messaging format. So don’t expect it to behave like IRC.
I appreciate the feedback regarding parsing tag messages, I’m already doing that, and thank you for the reference to sending commands via PRIVMSG. What I’m interested in here though is also parsing based on mode messages when they appear. Again from the docs,
If there are more than 1000 chatters in a room, NAMES return only the list of operator privileges currently in the room. The code stops sending JOIN/PART updates when the room size exceeds 1k. After that, it only sends “MODE changes” (any of the +o and -o commands above).
And regardless of channel size, it seems that MODE messages should be generated, but I still can’t see them even in a 3-user channel. I’m still trying to validate why they are not appearing, if anyone has any theories or can confirm they also do not see MODE messages. It would be much appreciated.
@xangold I’ve seen your name in some of these posts, my two cents for improving documentation would be to clarify that clients can’t send MODE messages on Twitch, as this is a deviation from IRC RFC and IRC devs might expect that functionality without something saying it is read-only. If there is a better way to submit such requests for consideration/improvement? Just trying to give back where I can, thanks!
(which is also linked at the bottom of the documentation pages)
Twitch doesn’t (fully) implement the RFC, TMI is a custom chat implementation that is available via an IRC port (and over websockets) that looks like IRC but it isn’t.
The general consensus is that they stop working in 1k+, and are generally not reliable, as tags/badges should be used instead. If you are not getting them, sounds like that sub system has dropped offline again (it’s no reliable, as again, tags/badges are the correct method to check for op status or other roles). I don’t bother even parsing for them (modes), as Tags/Badges are the correct way to check for moderator status (or other roles) in a channel
Twitch Chat provides an IRC compatible interface, but it is not designed to be compliant with the IRC RFC as it is it’s own system, just with support for IRC clients. As such you shouldn’t make assumptions beyond anything which is not mentioned specifically in the documentation.
Before this thread ages out (and back to the original subject line), can anyone confirm with first-hand knowledge that the MODE command is still supposed to (or not supposed) be shown to clients? I am unable to view a MODE command being generated when mod’ing someone, which seems to run counter to the documentation as an expected functionality.
TL;DR - Maybe… but people have known MODE is unreliable for years. Use TAGS.
First-hand knowledge would come from Twitch staff via documentation which includes this in the Intro:
While our IRC server generally follows RFC1459, there are several cases where it behaves slightly differently than other IRC servers; as described below, there are many Twitch-specific IRC capabilities. The differences are necessary to accommodate:
The massive scale at which our chat servers operate, and
Complex Twitch-specific features that we provide (to viewers, broadcasters, and developers).
We already know that the MODE/JOIN/PART/NAMES work in a non-standard fashion for a fact. They are all “batched” and run at intervals, and the MODE/JOIN/PART stop functioning after 1000 users.
It does state:
The code stops sending JOIN/PART updates when the room size exceeds 1k. After that, it only sends “MODE changes” (any of the +o and -o commands above).
Which I think you can take as, “it probably should continue to function” - but as others have said, there have been implementations that render the need for MODE moot. Anyone that maintains a bot knows that MODE is very unreliable.
Using the IRCv3 tags has been considered the efficient way of handling moderator status checks.
To close this topic out, after engaging with the staff, they now plan to officially remove this functionality
From my conversation with them: “Thanks for pointing this out. NAMES and MODE have not functioned properly for some time and will not be supported. As such, we have removed this from the documentation and the functionally will soon be removed from the IRC interface.”