<h1>IRC<aclass="headerlink"href="#irc"title="Permalink to this headline">¶</a></h1>
<p><aclass="reference external"href="https://en.wikipedia.org/wiki/Internet_Relay_Chat">IRC (Internet Relay Chat)</a> is a long standing
chat protocol used by many open-source projects for communicating in real time. By connecting one of
Evennia’s <aclass="reference internal"href="../Components/Channels.html"><spanclass="doc std std-doc">Channels</span></a> to an IRC channel you can communicate also with people not on
an mud themselves. You can also use IRC if you are only running your Evennia MUD locally on your
computer (your game doesn’t need to be open to the public)! All you need is an internet connection.
For IRC operation you also need <aclass="reference external"href="https://twistedmatrix.com/trac/wiki/TwistedWords">twisted.words</a>.
This is available simply as a package <em>python-twisted-words</em> in many Linux distros, or directly
downloadable from the link.</p>
<sectionid="configuring-irc">
<h2>Configuring IRC<aclass="headerlink"href="#configuring-irc"title="Permalink to this headline">¶</a></h2>
<p>To configure IRC, you’ll need to activate it in your settings file.</p>
<p>If you already know how IRC works, this should be pretty self-evident to use. Read the help entry
for more features.</p>
</section>
<sectionid="setting-up-irc-step-by-step">
<h2>Setting up IRC, step by step<aclass="headerlink"href="#setting-up-irc-step-by-step"title="Permalink to this headline">¶</a></h2>
<p>You can connect IRC to any Evennia channel (so you could connect it to the default <em>public</em> channel
if you like), but for testing, let’s set up a new channel <codeclass="docutils literal notranslate"><spanclass="pre">irc</span></code>.</p>
<divclass="highlight-none notranslate"><divclass="highlight"><pre><span></span> @ccreate irc = This is connected to an irc channel!
</pre></div>
</div>
<p>You will automatically join the new channel.</p>
<p>Next we will create a connection to an external IRC network and channel. There are many, many IRC
nets. <aclass="reference external"href="https://www.irchelp.org/networks/popular.html">Here is a list</a> of some of the biggest
ones, the one you choose is not really very important unless you want to connect to a particular
channel (also make sure that the network allows for “bots” to connect).</p>
<p>For testing, we choose the <em>Freenode</em> network, <codeclass="docutils literal notranslate"><spanclass="pre">irc.freenode.net</span></code>. We will connect to a test
channel, let’s call it <em>#myevennia-test</em> (an IRC channel always begins with <codeclass="docutils literal notranslate"><spanclass="pre">#</span></code>). It’s best if you
pick an obscure channel name that didn’t exist previously - if it didn’t exist it will be created
for you.</p>
<blockquote>
<div><p><em>Don’t</em> connect to <codeclass="docutils literal notranslate"><spanclass="pre">#evennia</span></code> for testing and debugging, that is Evennia’s official chat channel!
You <em>are</em> welcome to connect your game to <codeclass="docutils literal notranslate"><spanclass="pre">#evennia</span></code> once you have everything working though - it
can be a good way to get help and ideas. But if you do, please do so with an in-game channel open
only to your game admins and developers).</p>
</div></blockquote>
<p>The <em>port</em> needed depends on the network. For Freenode this is <codeclass="docutils literal notranslate"><spanclass="pre">6667</span></code>.</p>
<p>What will happen is that your Evennia server will connect to this IRC channel as a normal user. This
“user” (or “bot”) needs a name, which you must also supply. Let’s call it “mud-bot”.</p>
<p>To test that the bot connects correctly you also want to log onto this channel with a separate,
third-party IRC client. There are hundreds of such clients available. If you use Firefox, the
<em>Chatzilla</em> plugin is good and easy. Freenode also offers its own web-based chat page. Once you
have connected to a network, the command to join is usually <codeclass="docutils literal notranslate"><spanclass="pre">/join</span><spanclass="pre">#channelname</span></code> (don’t forget the
#).</p>
<p>Next we connect Evennia with the IRC channel.</p>
<p>Evennia will now create a new IRC bot <codeclass="docutils literal notranslate"><spanclass="pre">mud-bot</span></code> and connect it to the IRC network and the channel
#myevennia. If you are connected to the IRC channel you will soon see the user <em>mud-bot</em> connect.</p>
<p>Write something in the Evennia channel <em>irc</em>.</p>
<p>Write <codeclass="docutils literal notranslate"><spanclass="pre">Hello!</span></code> in your IRC client window and it will appear in your normal channel, marked with the
name of the IRC channel you used (#evennia here).</p>