Update - March 2016: Chat servers are being migrated to AWS which will change the hostname used to connect to chat. Instead of "irc.twitch.tv" you should use "irc.chat.twitch.tv". Some of the screenshots in this guide are old and still reference the old address. You can find out more about the migration on the developer forum.
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.chat.twitch.tv
- Port: 6667 or 6697 (SSL) (The chat servers also listen on ports 80 and 443 (SSL) 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.chat.twitch.tv:6667/?pass=oauth:token
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.chat.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.
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).