Unity and Twitch chat

Greetings,

I have established a connecting with twitch irc chat. I was able to get my user authenticated and join my channel.
However I am not getting any JOIN and PART messages. Ive been searching the web and there was word of membership requests. And some still said that the JOIN and PART messages don’t appear.

What is the current status on this? Am I able to get notification on users joining and leaving.

Thanks!

You have to request the messages to be sent using CAP REQ :twitch.tv/membership when connecting.

I am using that but it still doesn’t show me when a person leaves… Any ideas?

Understand while you are connecting to the TMI with an IRC client, it’s not IRC. It’s Twitch Messaging Interface (TMI).

running /quote CAP REQ :twitch.tv/membership or /raw CAP REQ :twitch.tv/membership

  • Adds membership state event (NAMES, JOIN, PART, or MODE) functionality. By default we do not send this data to clients without this capability.

Notes:

  • If there are greater than 1000 chatters in a room, NAMES will only return the list of OPs currently in the room
  • Due to caching, events are not sent immediately to a channel. They are instead batched up and sent every 10 seconds.
  • WHO is unsupported
  • All elevated users are given OP. To determine a user’s actual elevation level, request the tags capability and parse the user-type tag

As per: https://github.com/justintv/Twitch-API/blob/master/IRC.md

I read through all that. But I am not sure what command to send to the server in order to retrieve a list of logged in people. It should be NAMES but /NAMES #channel does not work.

Can you post the raw output of what you sent and received from the server (with PASS censored)?

The NAMES command is not available to be called. You only get sent NAMES on channel join.

@matt_thomas has given a full answer, and noted the restrictions. It’s not worth using the Membership CAP due to the 1000 person restriction.

To me it sounds like you are not consuming channel PART’s correctly inside your code.

For presence in a channel, most people use the (undocumented) endpoint from TMI: http://tmi.twitch.tv/group/user/barrycarlyon/chatters for example, returns a nice JSON packet of the people present in the room, without the 1000 person limitations that the Membership CAP has.

So I’d consider that, membership CAP is only really for OP flags if you are consuming moderators/staff using OP status.

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