mirror of
https://github.com/evennia/evennia.git
synced 2026-03-18 13:56:30 +01:00
229 lines
No EOL
12 KiB
HTML
229 lines
No EOL
12 KiB
HTML
|
||
<!DOCTYPE html>
|
||
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||
|
||
<title>Connect Evennia channels to IRC — Evennia 2.x documentation</title>
|
||
<link rel="stylesheet" href="../_static/nature.css" type="text/css" />
|
||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||
<script src="../_static/jquery.js"></script>
|
||
<script src="../_static/underscore.js"></script>
|
||
<script src="../_static/doctools.js"></script>
|
||
<script src="../_static/language_data.js"></script>
|
||
<link rel="shortcut icon" href="../_static/favicon.ico"/>
|
||
<link rel="index" title="Index" href="../genindex.html" />
|
||
<link rel="search" title="Search" href="../search.html" />
|
||
<link rel="next" title="Connect Evennia channels to RSS" href="Channels-to-RSS.html" />
|
||
<link rel="prev" title="Connect Evennia channels to Grapevine" href="Channels-to-Grapevine.html" />
|
||
</head><body>
|
||
|
||
|
||
|
||
|
||
<div class="related" role="navigation" aria-label="related navigation">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="../genindex.html" title="General Index"
|
||
accesskey="I">index</a></li>
|
||
<li class="right" >
|
||
<a href="../py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="Channels-to-RSS.html" title="Connect Evennia channels to RSS"
|
||
accesskey="N">next</a> |</li>
|
||
<li class="right" >
|
||
<a href="Channels-to-Grapevine.html" title="Connect Evennia channels to Grapevine"
|
||
accesskey="P">previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="../index.html">Evennia 2.x</a> »</li>
|
||
<li class="nav-item nav-item-1"><a href="Setup-Overview.html" accesskey="U">Server Setup and Life</a> »</li>
|
||
<li class="nav-item nav-item-this"><a href="">Connect Evennia channels to IRC</a></li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="document">
|
||
|
||
<div class="documentwrapper">
|
||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
||
<div class="sphinxsidebarwrapper">
|
||
<p class="logo"><a href="../index.html">
|
||
<img class="logo" src="../_static/evennia_logo.png" alt="Logo"/>
|
||
</a></p>
|
||
<div id="searchbox" style="display: none" role="search">
|
||
<h3 id="searchlabel">Quick search</h3>
|
||
<div class="searchformwrapper">
|
||
<form class="search" action="../search.html" method="get">
|
||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
||
<input type="submit" value="Go" />
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<script>$('#searchbox').show(0);</script>
|
||
<h3><a href="../index.html">Table of Contents</a></h3>
|
||
<ul>
|
||
<li><a class="reference internal" href="#">Connect Evennia channels to IRC</a><ul>
|
||
<li><a class="reference internal" href="#configuring-irc">Configuring IRC</a></li>
|
||
<li><a class="reference internal" href="#setting-up-irc-step-by-step">Setting up IRC, step by step</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<h4>Previous topic</h4>
|
||
<p class="topless"><a href="Channels-to-Grapevine.html"
|
||
title="previous chapter">Connect Evennia channels to Grapevine</a></p>
|
||
<h4>Next topic</h4>
|
||
<p class="topless"><a href="Channels-to-RSS.html"
|
||
title="next chapter">Connect Evennia channels to RSS</a></p>
|
||
<div role="note" aria-label="source link">
|
||
<!--h3>This Page</h3-->
|
||
<ul class="this-page-menu">
|
||
<li><a href="../_sources/Setup/Channels-to-IRC.md.txt"
|
||
rel="nofollow">Show Page Source</a></li>
|
||
</ul>
|
||
</div><h3>Links</h3>
|
||
<ul>
|
||
<li><a href="https://www.evennia.com/docs/latest/index.html">Documentation Top</a> </li>
|
||
<li><a href="https://www.evennia.com">Evennia Home</a> </li>
|
||
<li><a href="https://github.com/evennia/evennia">Github</a> </li>
|
||
<li><a href="http://games.evennia.com">Game Index</a> </li>
|
||
<li>
|
||
<a href="https://discord.gg/AJJpcRUhtF">Discord</a> -
|
||
<a href="https://github.com/evennia/evennia/discussions">Discussions</a> -
|
||
<a href="https://evennia.blogspot.com/">Blog</a>
|
||
</li>
|
||
</ul>
|
||
<h3>Doc Versions</h3>
|
||
<ul>
|
||
|
||
<li><a href="Channels-to-IRC.html">2.x (main branch)</a></li>
|
||
<ul>
|
||
<li><a href="../1.3.0/index.html">1.3.0 (v1.3.0 branch)</a></li>
|
||
|
||
<li><a href="../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
|
||
|
||
|
||
</ul>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="bodywrapper">
|
||
<div class="body" role="main">
|
||
|
||
<section class="tex2jax_ignore mathjax_ignore" id="connect-evennia-channels-to-irc">
|
||
<h1>Connect Evennia channels to IRC<a class="headerlink" href="#connect-evennia-channels-to-irc" title="Permalink to this headline">¶</a></h1>
|
||
<p><a class="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 <a class="reference internal" href="../Components/Channels.html"><span class="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 <a class="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>
|
||
<section id="configuring-irc">
|
||
<h2>Configuring IRC<a class="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>
|
||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span> <span class="n">IRC_ENABLED</span> <span class="o">=</span> <span class="kc">True</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>Start Evennia and log in as a privileged user. You should now have a new command available:
|
||
<code class="docutils literal notranslate"><span class="pre">@irc2chan</span></code>. This command is called like this:</p>
|
||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span> @irc2chan[/switches] <evennia_channel> = <ircnetwork> <port> <#irchannel> <botname>
|
||
</pre></div>
|
||
</div>
|
||
<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>
|
||
<section id="setting-up-irc-step-by-step">
|
||
<h2>Setting up IRC, step by step<a class="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 <code class="docutils literal notranslate"><span class="pre">irc</span></code>.</p>
|
||
<div class="highlight-none notranslate"><div class="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. <a class="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, <code class="docutils literal notranslate"><span class="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 <code class="docutils literal notranslate"><span class="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 <code class="docutils literal notranslate"><span class="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 <code class="docutils literal notranslate"><span class="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 <code class="docutils literal notranslate"><span class="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 <code class="docutils literal notranslate"><span class="pre">/join</span> <span class="pre">#channelname</span></code> (don’t forget the
|
||
#).</p>
|
||
<p>Next we connect Evennia with the IRC channel.</p>
|
||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span> @irc2chan irc = irc.freenode.net 6667 #myevennia-test mud-bot
|
||
</pre></div>
|
||
</div>
|
||
<p>Evennia will now create a new IRC bot <code class="docutils literal notranslate"><span class="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>
|
||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span> irc Hello, World!
|
||
[irc] Anna: Hello, World!
|
||
</pre></div>
|
||
</div>
|
||
<p>If you are viewing your IRC channel with a separate IRC client you should see your text appearing
|
||
there, spoken by the bot:</p>
|
||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>mud-bot> [irc] Anna: Hello, World!
|
||
</pre></div>
|
||
</div>
|
||
<p>Write <code class="docutils literal notranslate"><span class="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>
|
||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[irc] Anna@#myevennia-test: Hello!
|
||
</pre></div>
|
||
</div>
|
||
<p>Your Evennia gamers can now chat with users on external IRC channels!</p>
|
||
</section>
|
||
</section>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="related" role="navigation" aria-label="related navigation">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="../genindex.html" title="General Index"
|
||
>index</a></li>
|
||
<li class="right" >
|
||
<a href="../py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="Channels-to-RSS.html" title="Connect Evennia channels to RSS"
|
||
>next</a> |</li>
|
||
<li class="right" >
|
||
<a href="Channels-to-Grapevine.html" title="Connect Evennia channels to Grapevine"
|
||
>previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="../index.html">Evennia 2.x</a> »</li>
|
||
<li class="nav-item nav-item-1"><a href="Setup-Overview.html" >Server Setup and Life</a> »</li>
|
||
<li class="nav-item nav-item-this"><a href="">Connect Evennia channels to IRC</a></li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
|
||
<div class="footer" role="contentinfo">
|
||
© Copyright 2023, The Evennia developer community.
|
||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
|
||
</div>
|
||
</body>
|
||
</html> |