Something is very strange about your IRC system

For the last several days, I’ve been scratching my head, pulling my hair and screaming into the monitor from the absolutely nonsensical responses sent back from your IRC server. At this point, it cannot be bugs in my code. My IRC stuff works perfectly on other networks, but something very strange is going on with Twitch’s IRC.

I know that “events” can be lagged up to 10 seconds, so I’m not talking about lag here. I wait patiently, but random basic things just never show up, no matter what “IRCv3 capabilities” I enable/request.

  1. NOTICEs (or any other kind of signal) are not sent when a user is banned, or when a user tries to send a message while banned. However, NOTICEs are sent when slow mode is turned on/off, etc. (So it’s not me somehow ignoring the NOTICEs.)
  2. My bots/test account never seem to show up when I check the list of users in the room in the browser, even though they can speak in the room and Twitch’s IRC has displayed a “JOIN” message for the given bot/account.
  3. Sometimes, it displays a “JOIN” signal for my own user, for seemingly no reason. (It’s been way more than 10 seconds since I joined, and that was before I started up the bot.)

What could possibly be causing these things? As I’ve mentioned in several past threads, I debug-log anything the Twitch IRC server sends back, so I’m not filtering away any messages. I have requested all of those “capabilities”, and they do output a bunch of useless lines with @badge-blabla in them and whatnot, so it’s not that I’ve failed to enable these or anything.

Is there some major problem going on right now that I should know about? Is everything really working as normal/expected/intended?

I also do not get a message/notice with tags/membership/commands all enabled, in regards to banning someone. I do see a clearchat. I disconnected and generated a new token and reconnected. No change.

seems to behave fine on the regular/web client

I’ve not tested it recently in my code

tmi.twitch.tv CAP REQ :twitch.tv/commands
← :tmi.twitch.tv CAP * ACK :twitch.tv/commands
tmi.twitch.tv CAP REQ :twitch.tv/membership
← :tmi.twitch.tv CAP * ACK :twitch.tv/membership
tmi.twitch.tv CAP REQ :twitch.tv/tags
← :tmi.twitch.tv CAP * ACK :twitch.tv/tags

Here I /ban matt_cyborg from web chat.

← @room-id=35805066;target-user-id=125290656;tmi-sent-ts=1562792959786 :tmi.twitch.tv CLEARCHAT #matt_thomas :matt_cyborg
← PING :tmi.twitch.tv
tmi.twitch.tv PONG :tmi.twitch.tv

You should get a notice when you try to send a message after being banned.

  1. get banned
  2. Send PRIVMSG
  3. Get a notice saying PRIVMSG failed due to being banned

even in that case

tmi.twitch.tv PRIVMSG #matt_thomas :test
tmi.twitch.tv PRIVMSG #matt_thomas :test
← @msg-id=msg_ratelimit :tmi.twitch.tv NOTICE #matt_thomas :Your message was not sent because you are sending messages too quickly.

I didn’t get a message until I said it too quickly.

Collecting room state
{ tags: { msg_id: 'msg_banned' },
  command: 'NOTICE',
  message: 'You are permanently banned from talking in barrycarlyon.',
  user: false,
  room: '#barrycarlyon',
  action: false,
  score: 0 }
@msg-id=msg_banned :tmi.twitch.tv NOTICE #barrycarlyon :You are permanently banned from talking in barrycarlyon.

Works fine for me

    ws = new WebSocket('wss://irc-ws.chat.twitch.tv');

    ws.on('open', () => {
        ws.send('PASS oauth:' +  secrets.access_token);
        ws.send('NICK ' +  bot_name);

        ws.send('CAP REQ :twitch.tv/commands');
        ws.send('CAP REQ :twitch.tv/tags');

        ws.send('JOIN #' + channel_name);
    }).on('error', (err) => {
        console.log(err);
    });

Javascript

after JOIN message send

ws.send('PRIVMSG ' + room + ' :Rejoined');

Response is the above notice

I can cuase the rate limit error if I try spamming a message

{ tags: { msg_id: 'msg_banned' },
  command: 'NOTICE',
  message: 'You are permanently banned from talking in barrycarlyon.',
  user: false,
  room: '#barrycarlyon',
  action: false,
  score: 0 }
{ tags: { msg_id: 'msg_ratelimit' },
  command: 'NOTICE',
  message:
   'Your message was not sent because you are sending messages too quickly.',
  user: false,
  room: '#barrycarlyon',
  action: false,
  score: 0 }
{ tags: { msg_id: 'msg_ratelimit' },
  command: 'NOTICE',
  message:
   'Your message was not sent because you are sending messages too quickly.',
  user: false,
  room: '#barrycarlyon',
  action: false,
  score: 0 }
{ tags: { msg_id: 'msg_ratelimit' },
  command: 'NOTICE',
  message:
   'Your message was not sent because you are sending messages too quickly.',
  user: false,
  room: '#barrycarlyon',
  action: false,
  score: 0 }
{ tags: { msg_id: 'msg_ratelimit' },
  command: 'NOTICE',
  message:
   'Your message was not sent because you are sending messages too quickly.',
  user: false,
  room: '#barrycarlyon',
  action: false,
  score: 0 }
{ tags: { msg_id: 'msg_ratelimit' },
  command: 'NOTICE',
  message:
   'Your message was not sent because you are sending messages too quickly.',
  user: false,
  room: '#barrycarlyon',
  action: false,
  score: 0 }
{ tags: { msg_id: 'msg_ratelimit' },
  command: 'NOTICE',
  message:
   'Your message was not sent because you are sending messages too quickly.',
  user: false,
  room: '#barrycarlyon',
  action: false,
  score: 0 }
{ tags: { msg_id: 'msg_ratelimit' },
  command: 'NOTICE',
  message:
   'Your message was not sent because you are sending messages too quickly.',
  user: false,
  room: '#barrycarlyon',
  action: false,
  score: 0 }

Just like @matt_thomas , I do get that “CLEARCHAT” thing, but I didn’t even think it was worth mentioning because it’s not directly related to getting banned or being banned.

Any “new developments” on this matter?

I was wondering if it was because of the token we used, what scopes we have on them… how old it is… which server we dropped on… I’ll try to make a list later showing everything i can think of about my setup.

Maybe we can compare and find out why we don’t see it and Barry does.

I don’t work for Twitch and I can’t find any issue as it worked as expected for me during initial testing.

Whenever I send a message when banned I get the expected notice back when I have Tags and Commands Capabilities enabled.

My most recent tests have been using the Twitch Website itself.

And a token generated using the latest chat scopes.

And I have also tested using an ancient key on the old chat scopes. That seems to be where the fault is.

An oAuth generated using the deprecated scope of chat_login is not getting the notice. (Likely a spam counter measure but who knows)

This scope is also not even usable by “recently” create clientID’s so you shouldn’t be using it.

chat_login is (Deprecated — cannot be requested by new clients.) Log into chat and send messages.

Since the problem appears to be localized to the deprecated scope it’s unlike to be fixed as it works fine with chat:edit (for me at least) but I’ve observed a little inconsitency in my test accounts mix/matching mod/ban statuses here and there

End of the day the easiest way to see if you are banned, is to not send unsolicted messages in the first place (as your other posts suggest), or if you must check, open two connections to chat and see if your message arrived or not. (But that doesn’t discount a send fail)

It’s possible if you have been detected as a spam bot, you are getting silent fails.

I didn’t understand any of this (except the insults). chat_login? Never heard of anything related to that.

I’m sorry. What insults?

There are, at the time of writing, Three Authentication scopes that deal with Chat, one is deprecated (chat_login) and the other two, are read/write permissions (chat:edit, and chat:read) as per the documentation I linked to

I requested a token with the new chat scopes but I still don’t get a response when banned.

"scopes":["channel_commercial","channel_editor","channel_subscriptions","chat:edit","chat:read","user:edit:broadcast","user_follows_edit","user_read"]

[14:38:44/255] <<< PRIVMSG #tduvatest :faewfeawf
[14:38:44/540] >> @[tags] :tmi.twitch.tv USERSTATE #tduvatest
[14:38:47/130] >> @[tags] :tmi.twitch.tv CLEARCHAT #tduvatest :[name]
[14:38:50/190] <<< PRIVMSG #tduvatest :fewafwaf
[14:39:32/133] <<< PING
[14:39:32/321] >> PONG :tmi.twitch.tv

I’ve also tried creating a token with identical scopes with a client id registered last year (rather than many years ago), which has only ever been used for a few tests, so it couldn’t really have been flagged for spam or anything like that. I’ve also tried with different accounts. Same result, no response to sending a message when being banned.

I’m connecting through to chat via raw IRC, not Websocket.

There does seem to be a little inconsistency with it. (IRC/Websocket at the same as it all bridges to TMI in the background, just either provides a WS or IRC compatible interface).

Which I initially couldn’t replicate, but could with some keys generated with different scopes at a later date.

I’ve referred it but we’ll have to see what Twitch says on the matter. It might be related to some reported inconsistencies to the output of /mods

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.