From 2cb0ad809fea511f204a26b3ba6e3a05e3780437 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Sat, 18 Apr 2015 17:27:45 +0200 Subject: [PATCH] Updated IRC mod --- mods/irc/README.md | 56 +++++++++++++++++----------------- mods/irc/init.lua | 2 +- worlds/minetestforfun/news.txt | 1 + 3 files changed, 30 insertions(+), 29 deletions(-) diff --git a/mods/irc/README.md b/mods/irc/README.md index 414b6e08..006f09eb 100644 --- a/mods/irc/README.md +++ b/mods/irc/README.md @@ -6,28 +6,31 @@ 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 at http://minetest.net/forum/viewtopic.php?id=3905 +The forum topic is at https://forum.minetest.net/viewtopic.php?f=11&t=3905 + - Installing ---------- -Quick one line install for linux: +Quick one line install for Linux: - cd && git clone https://github.com/kaeza/minetest-irc.git irc && cd irc && git submodule update --init + cd && git clone --recursive https://github.com/kaeza/minetest-irc.git irc -Please change `` to fit your installation of minetest. +Please change `` to fit your installation of Minetest. For more information, see [the wiki](http://wiki.minetest.net/Installing_mods). -The Minetest IRC mod uses submodules, therefore you will have to run -`git submodule init` when first installing the mod, and `git submodule update` -every time that a submodule is updated. These steps can be combined as -`git submodule update --init`. +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`. -The Minetest IRC mod also requires LuaSocket. This can be installed using your -package manager on many distributions, for example on Arch Linux: +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: + # apt-get install lua-socket Settings @@ -35,10 +38,10 @@ Settings All settings are changed in `minetest.conf`. If any of these settings are not set, the default value is used. - * `irc.server` (string, default "irc.freenode.net") - This is the IRC server the mod connects to. + * `irc.server` (string) + The address of the IRC server to connect to. - * `irc.channel` (string, default "##mt-irc-mod") + * `irc.channel` (string) The IRC channel to join. * `irc.interval` (number, default 2.0) @@ -46,15 +49,14 @@ are not set, the default value is used. least 2.0 but can be higher. After four messages this much time must pass between folowing messages. - * `irc.nick` (string, default "MT-FFFFFF") - Nickname used as "proxy" for the in-game chat. - 'F' stands for a random base-16 number. + * `irc.nick` (string) + Nickname the server uses when it connects to IRC. - * `irc.password` (string, default "") + * `irc.password` (string, default nil) Password to use when connecting to the server. * `irc.NSPass` (string, default nil) - NickServ password. Don't use this if you use SASL authentication. + NickServ password. Don't set this if you use SASL authentication. * `irc.sasl.pass` (string, default nil) SASL password, same as nickserv password. @@ -62,7 +64,7 @@ are not set, the default value is used. if the server supports it. * `irc.sasl.user` (string, default `irc.nick`) - The SASL username. This should normaly be set to your main NickServ account name. + The SASL username. This should normaly be set to your NickServ account name. * `irc.debug` (boolean, default false) Whether to output debug information. @@ -84,13 +86,11 @@ are not set, the default value is used. Usage ----- -Once the game is connected to the IRC channel, chatting using the 'T' or -F10 hotkeys will send the messages to the channel, and will be visible -by anyone. Also, when someone sends a message to the channel, that text -will be visible in-game. +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. +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: @@ -115,7 +115,7 @@ This mod also adds a few chat commands: You can also send private messages from IRC to in-game players. -To do it, you must send a private message to the bot (set with +To do so, you must send a private message to the bot (set with the `irc.nick` option above), in the following format: @playername message @@ -151,7 +151,7 @@ forum topic. Thanks to you all! License ------- -(C) 2012-2013 Diego Martínez +Copyright © 2012-2013 Diego Martínez See LICENSE.txt for licensing information. diff --git a/mods/irc/init.lua b/mods/irc/init.lua index c67d2b48..c3033767 100644 --- a/mods/irc/init.lua +++ b/mods/irc/init.lua @@ -14,7 +14,7 @@ package.path = -- The build of Lua that Minetest comes with only looks for libraries under -- /usr/local/share and /usr/local/lib but LuaSocket is often installed under -- /usr/share and /usr/lib. -if not jit and package.config:sub(1, 1) == "/" then +if not rawget(_G, "jit") and package.config:sub(1, 1) == "/" then package.path = package.path.. ";/usr/share/lua/5.1/?.lua".. ";/usr/share/lua/5.1/?/init.lua" diff --git a/worlds/minetestforfun/news.txt b/worlds/minetestforfun/news.txt index 705e3d33..5ff2fc53 100644 --- a/worlds/minetestforfun/news.txt +++ b/worlds/minetestforfun/news.txt @@ -7,6 +7,7 @@ MAJ de "whoison" (la commande "/timeonline " peut aussi être utilisé d MAJ de "mobs" (ajout des chèvres/goats) ---??/??/2015--- (Remerciements : Mg) +MaJ de "irc" MaJ de "homedecor" MaJ de "metatools" Ajout du mod "connected_chests" (permet de fusionner deux chests, il suffit de placer le second en cliquant droit sur le côté du premier avec sneak enfoncé)