diff --git a/README.txt b/README.txt index 2cb58d9..28dbffd 100644 --- a/README.txt +++ b/README.txt @@ -13,10 +13,46 @@ Note: This mod is currently a work-in-progress, and is only tested under platforms are welcome. +COMPILING +--------- +Make sure you have CMake (http://cmake.org/), and of course, a C compiler, + on your system before proceeding. + +Under Windows: (note: untested) + - Open a command prompt and CD to the minetest-irc directory. + - Create a directory named "Build", and CD into it: + md Build + cd Build + - Run CMake to generate the build system (see your CMake docs for more + information about command line options). + cmake .. + - Use the build tool for the generated build system to compile the + native library. For example, if using Microsoft Visual Studio, open + the generated workspace and build from there. If using make, just run + "make" from within the Build directory. + - Use the packmod.bat batch file to copy the files into a ready to use + mod directory named `irc'. + +Under Linux: + - From a terminal, CD to the minetest-irc directory. + - Create a directory named "Build", and CD into it: + mkdir Build + cd Build + - Run CMake to generate the build system (see your CMake docs for more + information about command line options). + cmake .. + - Use the build tool for the generated build system to compile the + native library. For example, if using Code::Blocks, open the generated + workspace and build from there. If using make, just run "make" from + within the Build directory. + - Use the packmod.sh shell script to copy the files into a ready to use + mod directory named `irc'. + + INSTALLING ---------- -Unpack the archive and put the `irc' directory in any of the directories - where Minetest looks for mods. For more information, see: +Just put theit in any of the + directories where Minetest looks for mods. For more information, see: http://wiki.minetest.net/wiki/Installing_mods diff --git a/src/init.lua b/src/init.lua index dde8bff..fa24a20 100644 --- a/src/init.lua +++ b/src/init.lua @@ -114,6 +114,16 @@ minetest.register_on_chat_message(function ( name, message ) }; end); +minetest.register_chatcommand("me", { + params = ""; + description = "chat action (eg. /me orders a pizza)"; + privs = {shout=true}; + func = function(name, param) + minetest.chat_send_all("* "..name.." "..param); + irc.say(CHANNEL, "* "..name.." "..param); + end; +}) + irc.connect({ network = SERVER; nick = SERVER_NICK;