clone url: git://


1 <!DOCTYPE html>
2 <html xmlns="" lang="en" xml:lang="en">
3 <head>
4 <meta charset="utf-8" />
5 <meta name="generator" content="pandoc" />
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
7 <title>Connecting to Twitch with WeeChat</title>
8 <style>
9 code{white-space: pre-wrap;}
10 span.smallcaps{font-variant: small-caps;}
11 span.underline{text-decoration: underline;}
12 div.column{display: inline-block; vertical-align: top; width: 50%;}
13 div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
14 ul.task-list{list-style: none;}
15 </style>
16 <link rel="stylesheet" href="/assets/archive.css">
17 </head>
18 <body>
19 <main>
20 <h2 id="connecting-to-twitch-with-weechat">Connecting to Twitch with WeeChat</h2>
21 <p>2021-01-08 00:00</p>
22 <p>A while ago, <a href="">a friend</a>/IRC aficionado told me that <a href="">Twitch</a> uses IRC under the hood. It wasn’t until recently that I decided to go down a rabbit hole to learn how to connect to Twitch with WeeChat. It turns out it isn’t difficult at all, so I’m going to show you how to do exactly that!</p>
23 <p>Normally, I’d make this all nice and technical-writer-y, but I haven’t written a less-structured post in a while, and those kinds of posts are my favourite to write, so let’s begin!</p>
24 <h3 id="page-overview">Page overview</h3>
25 <!-- vim-markdown-toc GFM -->
26 <ul>
27 <li><a href="#getting-an-authentication-token">Getting an authentication token</a></li>
28 <li><a href="#adding-twitch-as-a-server-to-weechat">Adding Twitch as a server to WeeChat</a></li>
29 <li><a href="#what-doesnt-work">What doesn’t work</a></li>
30 <li><a href="#twitchs-irc-documentation">Twitch’s IRC documentation</a></li>
31 </ul>
32 <!-- vim-markdown-toc -->
33 <h3 id="getting-an-authentication-token">Getting an authentication token</h3>
34 <p>Okay! So, before you can connect, you will need to get an authentication token from Twitch, because your regular password won’t work! To get one of these, go to the <a href="">Twitch Chat OAuth Password Generator</a> page, and click the “Connect” button.</p>
35 <p>After clicking the “Connect” button, you should see a code on your screen that looks similar to the one below:</p>
36 <pre><code>oauth:llkasjdfkjdsfasdfkj32134234</code></pre>
37 <p>I just typed random letters and numbers, but let’s pretend that’s my actual code.</p>
38 <h3 id="adding-twitch-as-a-server-to-weechat">Adding Twitch as a server to WeeChat</h3>
39 <p>Now that we have a code, we can use it as a password for WeeChat. Let’s go ahead and setup WeeChat so we connect to Twitch’s IRC server as soon as we open up WeeChat. In the commands below, I’m going to use my Twitch username <code>m455b</code> as my username, and the authentication code above as my password:</p>
40 <pre><code>/server add twitch -ssl
41 /set irc.server.twitch.username &quot;m455b&quot;
42 /set irc.server.twitch.password oauth:llkasjdfkjdsfasdfkj32134234
43 /set irc.server.twitch.autoconnect on
44 /set irc.server.twitch.autojoin &quot;#m455b,#friends-username,#other-friends-username&quot;</code></pre>
45 <aside class="border">
46 <p>
47 <strong>Tip</strong>: If you want to store your password more securely, you can replace the password command with the two commands below:
48 </p>
49 <pre>
50 /secure set twitch_password oauth:llkasjdfkjdsfasdfkj32134234
51 /set irc.server.twitch.password "${}"
52 </pre>
53 </aside>
54 <p>In the commands above, I have <code>#friends-username</code> and <code>#other-friends-username</code> (ignore the missing punctuation, quotes aren’t supported in channel names on IRC). These should be replaced with real Twitch usernames, because Twitch treats usernames as IRC channels.</p>
55 <p>For example, if you follow someone on Twitch called <code>coolperson123</code>, and their Twitch URL is <code></code>, then you would add their Twitch channel to the <code>autojoin</code> list above as <code>#coolperson123</code>. You can see this in action above, where I’ve added my own Twitch channel, <code>#m455b</code>. This allows me to chat with my viewers on WeeChat, instead of having to open my browser to chat.</p>
56 <h3 id="what-doesnt-work">What doesn’t work</h3>
57 <ul>
58 <li>SASL doesn’t work, but secure passwords do.</li>
59 <li>I haven’t tried it yet, but you might able to type <code>/slowoff</code> in your own channel or one you moderate to remove the messages-per-time-frame limit that Twitch has.</li>
60 </ul>
61 <h3 id="twitchs-irc-documentation">Twitch’s IRC documentation</h3>
62 <p>For more information about Twitch’s IRC server, check out Twitch’s <a href="">Chatbots &amp; IRC Guide</a> page.</p>
63 </main>
64 </body>
65 </html>