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.

Overview

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

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.

OAuth "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:

  1. 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.
  2. Use an existing approved application to generate the token. I created a Javascript application to generate a token here. Simply click the "Connect with Twitch" button and follow the instructions.

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.

Client Information

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.)

Joining Channels

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.

Moderation Commands

Twitch "IRC" doesn't support the standard IRC KICK and 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 / with .

Example:
To timeout user bob for 10 minutes, the command would be .timeout bob as a standard channel message. Likewise .ban bob to ban him.

Technical Example:

PRIVMSG #channel :.timeout bob

PRIVMSG #channel :.ban bob  

Other Differences

  • Due to caching, JOIN, PART and MODE +/-o messages 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

(He)X-Chat

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:

ChatZilla

Change your nick first and then attach to the server:

/nick mynickname
/attach irc.twitch.tv:6667/?pass=oauth:token

KVIrc

Contributed by Izlsnizzt.

Adding a Network

Navigate to Settings > Configure Servers

Select the New Network icon in the top right and create a new network, I've named mine "Twitch".

Next Select New Server and enter irc.twitch.tv in the Server field.

Next click Advanced and enter your Twitch user name in the Nickname field and your OAUTH token in the Password field and click OK

Note - You may check Connect to this server at startup to join the server automatically when you start KVIRC.

Now simply click Connect Now.

Joining Channels

Standard IRC context applies here as above. To join a channel simply type /join #channelname in the dialogue box.

KVIRC can be configured to join channels automatically as well. To do this select the Join Channels tab in your Server Details page. Add channels by typing the channel name in the dialogue box and clicking Add (Don't forget the #hashtag).