From Minetest Wiki
< Mods
Revision as of 01:10, 9 April 2021 by Voxel (talk | contribs)
Jump to navigation Jump to search
A mod
Mod Type Server
Author kaeza
Forum topic 3905
Source code Github
Bower name irc
Technical name irc

This mod lets you connect the chat between in-game and an arbitrary IRC channel via an IRC bot.



This mod can run in any Minetest version (tested on 0.4.3 up to 0.4.10).

First of all, you will need to install the luasocket library. For example, on Debian-based distributions:

sudo apt-get install lua-socket

Installing using Git

First, the repo for the mod, then update the submodules:

cd /path/to/minetest/mods
git clone irc
cd irc
git submodule update --init

This will clone the LuaIRC library required for the mod.

That's it! It should be ready to go, at least for testing if it works.

Installing from zip archives

Download the main mod from here, and LuaIRC from here.

Unzip into your mods/ directory, and rename the resulting directory to just irc.

Unzip into the mods/irc/ directory, and rename the resulting directory to just irc (so that you have mods/irc/irc/).

That's it! It should be ready to go, at least for testing if it works.


Configuration for this mod is specified via minetest.conf.

The following options need to be specified for the mod to run:

# IRC server to connect to
irc.server =

# Channel to connect the bot to = #your-channel

# Nickname for the bot
irc.nick = YourBotName

Basic configuration


This is the server the bot will connect to.


This is the port on the server the bot will connect to. Default is 6667 (standard IRC port).

This is the channel the bot will join upon connection.


This specifies the nickname of the bot.


This specifies the username of the bot.


This specifies the realname of the bot.


Specifies the password to use to identify to NickServ. Default is empty, which means the bot will not be identified.
How to set up an account may vary between IRC networks. Consult the documentation for your IRC network for more information.

Advanced configuration

Please refer to config.lua in the mod's repository for all the available configuration settings.


Once you set up the mod and start the game server, your bot will connect to the specified IRC server and join the channel (see Basic configuration above).

Any text you say in-game will be seen on the channel, and any text sent to the channel will be seen in-game.

Chat commands

The mod adds some chat commands that can be invoked in-game:


Requires irc_admin privilege.
Connects again to the IRC server. Used after using /irc_disconnect.


Requires irc_admin privilege.
Disconnects from the IRC server.


Requires irc_admin privilege.
Reconnects again to the IRC server. This is effectively the same as using /irc_disconnect followed by using /irc_connect.


Parts (leaves) the channel. Your messages will not be visible in the channel, and channel messages will not be visible to you.


Joins the channel. Your messages will be visible in the channel, and channel messages will be visible to you. This is the default.

/irc_quote <line>

Requires irc_admin privilege.
Send a line to the IRC server directly. This can be used to send arbitrary commands to the IRC server.
Example: /irc_quote PRIVMSG #thechannel :Hello!

/irc_msg <nickname> <message>

Requires shout privilege.
Send a private message to an user on IRC.
Example: /irc_msg OtherUser Hello!


List the people currently in the IRC channel.

In addition, it overrides the /me command to send the action to IRC.

Bot commands

The mod adds some bot commands that can be invoked from IRC. The commands can be invoked in two ways:

  • Write the name of the bot, followed by either a comma (',') or a colon (':'), followed by a space, and then the command. Example: RandomBot: uptime
  • Send the command directly to the bot as a private message. Example: /msg RandomBot uptime

If you communicate with the bot via the channel, it responds in the channel. If you communicate via PM, it responds privately.

help <command>

Prints help about a bot command.
Example: help uptime


Lists the available bot commands.


Outputs the amount of time the server has been up.


Outputs the names of the players currently in game.

whereis <name>

Outputs the location of the player named name.
Example: whereis JohnDoe

Other mods can register their own bot commands (see Application Programming Interface below).

Application Programming Interface

There's an API for other mods to use. Please refer to in the mod distribution. (Note: the MarkDown view is currently broken).


This is a list of add-on mods that explicitly support IRC mod API:

Known issues


Many distributions install luasocket in a place that Minetest's builtin Lua library doesn't look in. The IRC mod adds some extra search paths, but it can't support esoteric configurations. This issue is manifested by Minetest exiting with the error "Failed to load and run .../irc/init.lua", complaining it can't find socket or

To fix this, you have a few options:

  • Use LuaJIT, which isn't bundled with Minetest and is correctly configured by the distro.
  • Create a symlink at /usr/local/lib/lua/5.1/socket pointing to /usr/i686-linux-gnu/lib/lua/5.1/socket.
  • Open irc/init.lua (not irc/irc/init.lua!), and add this line at the start:
ie.package.cpath = "/usr/i686-linux-gnu/lib/lua/5.1/?.so;"

Replace "i686-linux-gnu" with your architecture if different. For example, Debian 8 requires:

ie.package.cpath = "/usr/lib/x86_64-linux-gnu/lua/5.1/?.so;"