IRC Mod for Minetest
Go to file
2023-11-22 23:42:44 +01:00
.github/workflows Add luacheck GitHub integration (#62) 2020-02-19 18:46:29 +01:00
irc@b8d594e651 Mise à jour du submodule irc 2018-12-09 21:19:42 +01:00
.gitignore Remove included Lua and LuaSocket source 2014-05-15 20:20:22 -04:00
.gitmodules Mise à jour de l'URL du submodule irc again 2019-05-11 22:37:09 +02:00
.luacheckrc Add luacheck GitHub integration (#62) 2020-02-19 18:46:29 +01:00
API.md Major cleanup. 2017-03-15 21:40:12 -03:00
botcmds.lua Add number of connected players to players command (#73) 2023-11-04 18:56:07 +01:00
callback.lua Fix failing luacheck 2020-07-18 18:00:38 +02:00
chatcmds.lua Major cleanup. 2017-03-15 21:40:12 -03:00
config.lua Fix deprecated functions, update to 5.x (#59) 2019-10-05 09:25:05 +02:00
hooks.lua Fix error caused by ident check notice (#71) 2022-03-23 22:13:51 +01:00
init.lua Merge branch 'master' of yunohost.local:minetest-mods/irc into nalc-1.2-dev 2019-12-22 13:32:22 +01:00
LICENSE.txt Remove included Lua and LuaSocket source 2014-05-15 20:20:22 -04:00
messages.lua Add support for configurable coloring of IRC messages in-game 2018-11-02 21:54:36 -07:00
mod.conf Fix deprecated functions, update to 5.x (#59) 2019-10-05 09:25:05 +02:00
player_part.lua Display total number of players with /who (#65) 2020-07-18 17:57:42 +02:00
README.md Add luacheck GitHub integration (#62) 2020-02-19 18:46:29 +01:00
settingtypes.txt Add option to broadcast kick messages. 2017-02-21 02:07:36 -03:00

IRC Mod for Minetest

Introduction

This mod is just a glue between IRC and Minetest. It provides two-way communication between the in-game chat, and an arbitrary IRC channel.

The forum topic is here.

Installing

Quick one line install for Linux:

cd <Mods directory> && git clone --recursive https://github.com/minetest-mods/irc.git

Please change <Mods directory> to fit your installation of Minetest. For more information, see the wiki.

The IRC mod's git repository uses submodules, therefore you will have to run git submodule init when first installing the mod (unless you used --recursive as above), and git submodule update every time that a submodule is updated. These steps can be combined into git submodule update --init.

You'll need to install LuaSocket. You can do so with your package manager on many distributions, for example:

# # On Arch Linux:
# pacman -S lua51-socket
# # On Debian/Ubuntu:
# # Debian/Ubuntu's LuaSocket packages are broken, so use LuaRocks.
# apt-get install luarocks
# luarocks install luasocket

You will also need to add IRC to your trusted mods if you haven't disabled mod security. Here's an example configuration line:

secure.trusted_mods = irc

Settings

All settings are changed in minetest.conf. If any of these settings are not set, the default value is used.

  • irc.server (string): The address of the IRC server to connect to.

  • irc.channel (string): The IRC channel to join.

  • irc.interval (number, default 2.0): This prevents the server from flooding. It should be at least 2.0 but can be higher. After four messages this much time must pass between folowing messages.

  • irc.nick (string): Nickname the server uses when it connects to IRC.

  • irc.password (string, default nil): Password to use when connecting to the server.

  • irc.NSPass (string, default nil): NickServ password. Don't set this if you use SASL authentication.

  • irc.sasl.pass (string, default nil): SASL password, same as nickserv password. You should use this instead of NickServ authentication if the server supports it.

  • irc.sasl.user (string, default irc.nick): The SASL username. This should normaly be set to your NickServ account name.

  • irc.debug (boolean, default false): Whether to output debug information.

  • irc.disable_auto_connect (boolean, default false): If false, the bot is connected by default. If true, a player with the 'irc_admin' privilege has to use the /irc_connect command to connect to the server.

  • irc.disable_auto_join (boolean, default false): If false, players join the channel automatically upon entering the game. If true, each user must manually use the /join command to join the channel. In any case, the players may use the /part command to opt-out of being in the channel.

  • irc.send_join_part (boolean, default true): Determines whether to send player join and part messages to the channel.

Usage

Once the game is connected to the IRC channel, chatting in-game will send messages to the channel, and will be visible by anyone. Also, messages sent to the channel will be visible in-game.

Messages that begin with [off] from in-game or IRC are not sent to the other side.

This mod also adds a few chat commands:

  • /irc_msg <nick> <message>: Send a private message to a IRC user.

  • /join: Join the IRC chat.

  • /part: Part the IRC chat.

  • /irc_connect: Connect the bot manually to the IRC network.

  • /irc_disconnect: Disconnect the bot manually from the IRC network (this does not shutdown the game).

  • /irc_reconnect: Equivalent to /irc_disconnect followed by /irc_connect.

You can also send private messages from IRC to in-game players by sending a private message to the bot (set with the irc.nick option above), in the following format:

@playername message

For example, if there's a player named mtuser, you can send him/her a private message from IRC with:

/msg server_nick @mtuser Hello!

The bot also supports some basic commands, which are invoked by saying the bot name followed by either a colon or a comma and the command, or sending a private message to it. For example: ServerBot: help whereis.

  • help [<command>]: Prints help about a command, or a list of supported commands if no command is given.

  • uptime: Prints the server's running time.

  • whereis <player>: Prints the coordinates of the given player.

  • players: Lists players currently in the server.

Thanks

I'd like to thank the users who supported this mod both on the Minetest Forums and on the #minetest channel. In no particular order:

0gb.us, ShadowNinja, Shaun/kizeren, RAPHAEL, DARGON, Calinou, Exio, vortexlabs/mrtux, marveidemanis, marktraceur, jmf/john_minetest, sdzen/Muadtralk, VanessaE, PilzAdam, sfan5, celeron55, KikaRz, OldCoder, RealBadAngel, and all the people who commented in the forum topic. Thanks to you all!

License

See LICENSE.txt for details.

The files in the irc directory are part of the LuaIRC project. See irc/LICENSE.txt for details.