A Guide to Twitch "IRC"
The goal of this guide is to instruct users on how to connect to Twitch chat with an IRC client and also address the differences between Twitch chat and other IRC services. There is also a more technical guide here.
The Twitch chat system is not an IRC server. It is a more complex multi-tiered system that also happens to provide a compatible interface that most IRC clients will understand. The main difference an end user will notice is the command system for channel moderation. We will cover that is more detail later.
Technical: While the system is built to follow RFC1459 there are a lot of differences.
Connecting is a two part process. First you must obtain an OAuth token to use as your password and then use that token to connect as your password.
Currently raw password authentication is disabled in the chat system for security reasons. Users wanting to connect via IRC need to generate an OAuth token via the Twitch API with the appropriate scope to connect.
There are two main ways to do this:
- Create your own application to generate the token. This is aimed for developers wanting more control and having the OAuth 2 knowledge to generate the tokens. See the official API documentation for more info.
The format of the token you will use for your password is: oauth:token. If you used step 1 then you will need to prepend oauth:. Step 2 will already include that part.
Once you have a token generated you should save it in a safe place for future reference. A single application can only generate one valid token per user so re-requesting another will invalidate any previous ones.
The basic connection information is as follows. In a future section I will include information about specific IRC clients.
- Nickname: Your Twitch username in all lowercase
- Server: irc.twitch.tv
- Port: 6667 (The chat servers also listen on ports 80 and 443 so you can use those if you are in a restrictive network.)
- Server Password: Your OAuth token from the previous section (Remember to include
oauth:if it's not already added.)
Channels on Twitch "IRC" are in all lowercase and start with #. For example, if you want to chat in twitch.tv/Day9TV then you would join #day9tv.
You can join them either through the graphical interface in your IRC client or by typing /join #channel.
Twitch "IRC" doesn't support the standard IRC
MODE +b ban methods. If you want to timeout or ban a user from a channel you will need to use the web chat commands expect replace
To timeout user bob for 10 minutes, the command would be .timeout bob as a standard channel message. Likewise .ban bob to ban him.
PRIVMSG #channel :.timeout bob PRIVMSG #channel :.ban bob
- Due to caching,
MODE +/-omessages are not sent immediately on channel or user join. There is a delay of 30 seconds - 1 minute before they are sent.
- To prevent overload, the chat server will impose an 8 hour IP lockout for users sending more than 20 messages/commands within a 30 second period.
Client Specific Configuration
Adding a network
Note: Newer versions Hexchat have a Login method dropdown. If your version does not have this option, make sure you enter your password in Server Password.
Adding custom timeout and ban dialog options
Go to Settings > User List popup... and enter the commands there.
%s refers to the selected username.
%c refers to the current channel.
The end result is something like:
Change your nick first and then attach to the server:
/nick mynickname /attach irc.twitch.tv:6667/?pass=oauth:token
If anyone would like to contribute instructions with screenshots, let me know in the comments.