Code Monkey home page Code Monkey logo

irc's Introduction

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.

irc's People

Contributors

0gb-us avatar cat5tv avatar clinew avatar clobberxd avatar kaeza avatar kizeren avatar luk3yx avatar miniontoby avatar panquesito7 avatar rdococ avatar red-001 avatar sfan5 avatar shadowninja avatar smalljoker avatar sofar avatar src4026 avatar thatgraemeguy avatar timcu avatar vanessae avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

irc's Issues

Logging in and out.

Game only shows the first person to log in and out.

Example

(Kiz-GameBot) *** Shaun joined the game
(Kiz-GameBot) (Shaun) hi
(Kiz-GameBot) *** Shaun left the game
(Kiz-GameBot) (kizeren) hi

Can see my admin account log in and out but not my kizeren account. This was in IRC channel.

Incompatibility - Wacky Responses.

Some commands are wacky with how they respond. "cmd seen" and "cmd who" do not work. "cmd mail" from the chatplus mod shows a confirmation in a private message window even if the command was induced in the public chat. I'm not sure if this belongs in the same issue, but "(timed out)" does not display on quit messages which have this in-game. All this has been tested in Craig's Server (#minetest-craig on InchraNet) and might not apply universally.

Ability to ignore IRC users.

Putting this here for discussion and as sort of TO-DO.

Some mechanism may be needed for the bot to completely ignore commands issued by misbehaving IRC users.

While /mode +q (or +b) prevents them from using the bot in the channel, private messages cannot be blocked.

server patch configurable at settingstypes.txt

due several differences on dependences requirementes the server path are always diiferent from distributions.. so i guess we can added a string configurable with settingstype.txt and also in config file to provide the search path for lua libs, i will send a PR that will solve isues like #54 #66 and some olders

IRC should override `minetest.send_join/leave_message`

Hello. We have a mod in CTF that over-rides minetest.send_join/leave_message to hide the join and leave messages of a certain group of players. While that works for in-game messages, IRC bypasses the aforementioned functions and directly outputs the message to the channel (if set to send join/leave messages). So mods don't have the opportunity to suppress join/leave messages for select players, and other such use-cases.

I was wondering if IRC could instead override minetest.send_join/leave_message like so:

local old_join_func = minetest.send_join_message
function minetest.send_join_message(player_name, ...)
	// Announce player join on IRC channel
	irc.say("*** "..name.." joined the game")

	return old_join_func(player_name, ...)
end

So then I can do:

local old_join_func - minetest.send_join_message
function minetest.send_join_message(pname, ...)
	-- Skip join message if player matches super special criteria
	if not super_special_criteria(pname) then
		return old_join_func(pname, ...)
	end
end

Thoughts and discussion welcome. I'd be willing to implement this if people think this is a good idea.

Announce player death in IRC chatroom.

It would be nice to announce player deaths (and possibly respawns) in IRC to give some context to in-game conversation.

Preferably configurable on/off.

The irc.NSPass setting is not used

Hello,
In my minetest.conf configuration file, I add this last line:

irc.NSPass = PASS

With PASS corresponding to the real password of my registered nick.
However, when I am reading the logs on my IRC server [1], I see that my bot does not use the NickServ IDENTIFY command.
That's weird because when I check your mod [2] source code, it seems that you correctly handles the thing:

$ grep -r "NSPass"
README.md:  * `irc.NSPass` (string, default nil)
init.lua:	if self.config.NSPass then
init.lua:		self:say("NickServ", "IDENTIFY "..self.config.NSPass)
config.lua:setting("string", "NSPass") -- NickServ password

Of course, I have no problem to identify my bot outside of Minetest (for example through the HexChat IRC client).
Can you help me to identify my bot please?
Thank you.
Best regards.

[1] ircd-hybrid 8.2.20 with anope 2.0.4
[2] minetest-irc 0c47e10

Passwords containing spaces

When I try to log in via the bot, I get a "Player name and password required." message because my password contains spaces.

../init.lua:48: module 'irc' not found:

Hi,
Impossible to run minetest with IRC mod.
I made all the requirements, installed lua packages, however I got this :

ModError: Failed to load and run script from /home/amelaye/.minetest/mods/irc/init.lua:
/home/amelaye/.minetest/mods/irc/init.lua:48: module 'irc' not found:
no field package.preload['irc']
no file '/mods/irc/irc/init.lua'
no file '/mods/irc/irc.lua'
no file './irc.lua'
no file '/usr/share/luajit-2.1.0-beta3/irc.lua'
no file '/usr/local/share/lua/5.1/irc.lua'
no file '/usr/local/share/lua/5.1/irc/init.lua'
no file '/usr/share/lua/5.1/irc.lua'
no file '/usr/share/lua/5.1/irc/init.lua'
no file '/usr/share/lua/5.1/irc.lua'
no file '/usr/share/lua/5.1/irc/init.lua'
no file '/usr/lib/x86_64-linux-gnu/lua/5.1/irc.so'
no file './irc.so'
no file '/usr/local/lib/lua/5.1/irc.so'
no file '/usr/lib/x86_64-linux-gnu/lua/5.1/irc.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/usr/lib/lua/5.1/irc.so'
no file '/usr/lib64/lua/5.1/irc.so'
stack traceback:
[C]: in function 'require'
/home/amelaye/.minetest/mods/irc/init.lua:48: in main chunk
Voir debug.txt pour plus d'informations.

Submodule not found

O.K. I have tried a few dozen times on 3 computers to get irc (the new version) to work, and it won't get past git submodule update. It keeps telling me submodule not found.

I tried a bunch of things, I started with the exact script from the README.md, nothing helps!

`bad argument #1 to 'sub' (number expected, got nil)` error - fail to join channel

/var/minetest/.minetest/mods/irc/irc/messages.lua:107: bad argument #1 to 'sub' (number expected, got nil)
 stack traceback:
 	[C]: in function 'sub'
    /var/minetest/.minetest/mods/irc/irc/messages.lua:107: in function 'fromRFC1459'
    /var/minetest/.minetest/mods/irc/irc/messages.lua:12: in function 'Message'
    /var/minetest/.minetest/mods/irc/irc/init.lua:174: in function 'think'
    /var/minetest/.minetest/mods/irc/init.lua:131: in function </var/minetest/.minetest/mods/irc/init.lua:131>
[C]: in function 'xpcall'
    /var/minetest/.minetest/mods/irc/init.lua:131: in function </var/minetest/.minetest/mods/irc/init.lua:120>
    /usr/share/minetest/builtin/game/register.lua:429: in function </usr/share/minetest/builtin/game/register.lua:413>

Can't find LuaSocket when using bundled Lua on Debian

Debian jessie 64-bit. lua-socket-dev is installed. Both lua5.1 and liblua5.1-0-dev are installed.

08:06:53: WARNING: Undeclared global variable "jit" accessed at /home/hugo/.minetest/mods/irc/init.lua:16
2015-04-03 08:06:53: ERROR[main]: ========== ERROR FROM LUA ===========
2015-04-03 08:06:53: ERROR[main]: Failed to load and run script from 
2015-04-03 08:06:53: ERROR[main]: /home/hugo/.minetest/mods/irc/init.lua:
2015-04-03 08:06:53: ERROR[main]: /usr/share/lua/5.1/socket.lua:12: module 'socket.core' not found:
2015-04-03 08:06:53: ERROR[main]:       no field package.preload['socket.core']
2015-04-03 08:06:53: ERROR[main]:       no file '/home/hugo/.minetest/mods/irc/socket/core/init.lua'
2015-04-03 08:06:53: ERROR[main]:       no file '/home/hugo/.minetest/mods/irc/socket/core.lua'
2015-04-03 08:06:53: ERROR[main]:       no file './socket/core.lua'
2015-04-03 08:06:53: ERROR[main]:       no file '/usr/local/share/lua/5.1/socket/core.lua'
2015-04-03 08:06:53: ERROR[main]:       no file '/usr/local/share/lua/5.1/socket/core/init.lua'
2015-04-03 08:06:53: ERROR[main]:       no file '/usr/local/lib/lua/5.1/socket/core.lua'
2015-04-03 08:06:53: ERROR[main]:       no file '/usr/local/lib/lua/5.1/socket/core/init.lua'
2015-04-03 08:06:53: ERROR[main]:       no file '/usr/share/lua/5.1/socket/core.lua'
2015-04-03 08:06:53: ERROR[main]:       no file '/usr/share/lua/5.1/socket/core/init.lua'
2015-04-03 08:06:53: ERROR[main]:       no file './socket/core.so'
2015-04-03 08:06:53: ERROR[main]:       no file '/usr/local/lib/lua/5.1/socket/core.so'
2015-04-03 08:06:53: ERROR[main]:       no file '/usr/local/lib/lua/5.1/loadall.so'
2015-04-03 08:06:53: ERROR[main]:       no file '/usr/lib/lua/5.1/socket/core.so'
2015-04-03 08:06:53: ERROR[main]:       no file './socket.so'
2015-04-03 08:06:53: ERROR[main]:       no file '/usr/local/lib/lua/5.1/socket.so'
2015-04-03 08:06:53: ERROR[main]:       no file '/usr/local/lib/lua/5.1/loadall.so'
2015-04-03 08:06:53: ERROR[main]:       no file '/usr/lib/lua/5.1/socket.so'
2015-04-03 08:06:53: ERROR[main]: stack traceback:
2015-04-03 08:06:53: ERROR[main]:       [C]: in function 'require'
2015-04-03 08:06:53: ERROR[main]:       /usr/share/lua/5.1/socket.lua:12: in main chunk
2015-04-03 08:06:53: ERROR[main]:       [C]: in function 'require'
2015-04-03 08:06:53: ERROR[main]:       /home/hugo/.minetest/mods/irc/irc/init.lua:1: in main chunk
2015-04-03 08:06:53: ERROR[main]:       [C]: in function 'require'
2015-04-03 08:06:53: ERROR[main]:       /home/hugo/.minetest/mods/irc/init.lua:32: in main chunk
2015-04-03 08:06:53: ERROR[main]: ======= END OF ERROR FROM LUA ========
2015-04-03 08:06:53: ERROR[main]: Server: Failed to load and run /home/hugo/.minetest/mods/irc/init.lua
2015-04-03 08:06:53: ERROR[main]: ERROR: An unhandled exception occurred: ModError: Failed to load and run /home/hugo/.minetest/mods/irc/init.lua

Copying the LuaSocket library to ./socket.so creates the following error instead:

08:11:45: WARNING: Undeclared global variable "jit" accessed at /home/hugo/.minetest/mods/irc/init.lua:16
2015-04-03 08:11:45: ERROR[main]: ========== ERROR FROM LUA ===========
2015-04-03 08:11:45: ERROR[main]: Failed to load and run script from 
2015-04-03 08:11:45: ERROR[main]: /home/hugo/.minetest/mods/irc/init.lua:
2015-04-03 08:11:45: ERROR[main]: /usr/share/lua/5.1/mime.lua:12: module 'mime.core' not found:
2015-04-03 08:11:45: ERROR[main]:       no field package.preload['mime.core']
2015-04-03 08:11:45: ERROR[main]:       no file '/home/hugo/.minetest/mods/irc/mime/core/init.lua'
2015-04-03 08:11:45: ERROR[main]:       no file '/home/hugo/.minetest/mods/irc/mime/core.lua'
2015-04-03 08:11:45: ERROR[main]:       no file './mime/core.lua'
2015-04-03 08:11:45: ERROR[main]:       no file '/usr/local/share/lua/5.1/mime/core.lua'
2015-04-03 08:11:45: ERROR[main]:       no file '/usr/local/share/lua/5.1/mime/core/init.lua'
2015-04-03 08:11:45: ERROR[main]:       no file '/usr/local/lib/lua/5.1/mime/core.lua'
2015-04-03 08:11:45: ERROR[main]:       no file '/usr/local/lib/lua/5.1/mime/core/init.lua'
2015-04-03 08:11:45: ERROR[main]:       no file '/usr/share/lua/5.1/mime/core.lua'
2015-04-03 08:11:45: ERROR[main]:       no file '/usr/share/lua/5.1/mime/core/init.lua'
2015-04-03 08:11:45: ERROR[main]:       no file './mime/core.so'
2015-04-03 08:11:45: ERROR[main]:       no file '/usr/local/lib/lua/5.1/mime/core.so'
2015-04-03 08:11:45: ERROR[main]:       no file '/usr/local/lib/lua/5.1/loadall.so'
2015-04-03 08:11:45: ERROR[main]:       no file '/usr/lib/lua/5.1/mime/core.so'
2015-04-03 08:11:45: ERROR[main]:       no file './mime.so'
2015-04-03 08:11:45: ERROR[main]:       no file '/usr/local/lib/lua/5.1/mime.so'
2015-04-03 08:11:45: ERROR[main]:       no file '/usr/local/lib/lua/5.1/loadall.so'
2015-04-03 08:11:45: ERROR[main]:       no file '/usr/lib/lua/5.1/mime.so'
2015-04-03 08:11:45: ERROR[main]: stack traceback:
2015-04-03 08:11:45: ERROR[main]:       [C]: in function 'require'
2015-04-03 08:11:45: ERROR[main]:       /usr/share/lua/5.1/mime.lua:12: in main chunk
2015-04-03 08:11:45: ERROR[main]:       [C]: in function 'require'
2015-04-03 08:11:45: ERROR[main]:       /home/hugo/.minetest/mods/irc/hooks.lua:5: in main chunk
2015-04-03 08:11:45: ERROR[main]:       [C]: in function 'dofile'
2015-04-03 08:11:45: ERROR[main]:       /home/hugo/.minetest/mods/irc/init.lua:40: in main chunk
2015-04-03 08:11:45: ERROR[main]: ======= END OF ERROR FROM LUA ========
2015-04-03 08:11:45: ERROR[main]: Server: Failed to load and run /home/hugo/.minetest/mods/irc/init.lua
2015-04-03 08:11:45: ERROR[main]: ERROR: An unhandled exception occurred: ModError: Failed to load and run /home/hugo/.minetest/mods/irc/init.lua

Then, if you copy the mime.so library, it works.

mod error

why am i getting this?

2017-01-23 19:00:51: ERROR[Main]: ModError: Failed to load and run script from /usr/share/minetest/games/minetest_game/mods/irc/init.lua:
2017-01-23 19:00:51: ERROR[Main]: ...share/minetest/games/minetest_game/mods/irc/irc/init.lua:1: module 'socket' not found:
2017-01-23 19:00:51: ERROR[Main]: 	no field package.preload['socket']
2017-01-23 19:00:51: ERROR[Main]: 	no file '/usr/share/minetest/games/minetest_game/mods/irc/socket/init.lua'
2017-01-23 19:00:51: ERROR[Main]: 	no file '/usr/share/minetest/games/minetest_game/mods/irc/socket.lua'
2017-01-23 19:00:51: ERROR[Main]: 	no file './socket.lua'
2017-01-23 19:00:51: ERROR[Main]: 	no file '/usr/share/luajit-2.0.4/socket.lua'
2017-01-23 19:00:51: ERROR[Main]: 	no file '/usr/local/share/lua/5.1/socket.lua'
2017-01-23 19:00:51: ERROR[Main]: 	no file '/usr/local/share/lua/5.1/socket/init.lua'
2017-01-23 19:00:51: ERROR[Main]: 	no file '/usr/share/lua/5.1/socket.lua'
2017-01-23 19:00:51: ERROR[Main]: 	no file '/usr/share/lua/5.1/socket/init.lua'
2017-01-23 19:00:51: ERROR[Main]: 	no file './socket.so'
2017-01-23 19:00:51: ERROR[Main]: 	no file '/usr/local/lib/lua/5.1/socket.so'
2017-01-23 19:00:51: ERROR[Main]: 	no file '/usr/lib64/lua/5.1/socket.so'
2017-01-23 19:00:51: ERROR[Main]: 	no file '/usr/local/lib/lua/5.1/loadall.so'
2017-01-23 19:00:51: ERROR[Main]: stack traceback:
2017-01-23 19:00:51: ERROR[Main]: 	[C]: in function 'require'
2017-01-23 19:00:51: ERROR[Main]: 	...share/minetest/games/minetest_game/mods/irc/irc/init.lua:1: in main chunk
2017-01-23 19:00:51: ERROR[Main]: 	[C]: in function 'require'
2017-01-23 19:00:51: ERROR[Main]: 	/usr/share/minetest/games/minetest_game/mods/irc/init.lua:41: in main chunk

Crash backtrace

Hi, I've got this backtrace from a user on irc:

16:50:47: ACTION[ServerThread]: IRC: Connected!
/home/minetest/.minetest/mods/irc/irc/messages.lua:106: bad argument #1 to 'sub' (number expected, got nil)
stack traceback:
        [C]: in function 'sub'
        /home/minetest/.minetest/mods/irc/irc/messages.lua:106: in function 'fromRFC1459'
        /home/minetest/.minetest/mods/irc/irc/messages.lua:13: in function 'Message'
        /home/minetest/.minetest/mods/irc/irc/main.lua:165: in function 'think'
        /home/minetest/.minetest/mods/irc/init.lua:72: in function </home/minetest/.minetest/mods/irc/init.lua:72>
        [C]: in function 'xpcall'
        /home/minetest/.minetest/mods/irc/init.lua:72: in function </home/minetest/.minetest/mods/irc/init.lua:61>
        (tail call): ?
        ...opt/minetest-0.4.12/bin/../builtin/game/register.lua:341: in function <...opt/minetest-0.4.12/bin/../builtin/game/register.lua:329>

They didn't say how to reproduce, just that mods are recent.
Also, its unlikely to be a config error, as irc worked previously.

Chat from game to irc crashes the game. Chat from IRC to game works fine. Any ideas?

2018-08-27 10:17:22: ACTION[main]: Irrlicht: Could not open file of texture: character.png
2018-08-27 10:17:23: ACTION[main]: Irrlicht: Could not open file of texture: character.png
2018-08-27 17:17:30: ERROR[main]: UNRECOVERABLE error occurred. Stopping server. Please fix the following error:
2018-08-27 17:17:30: ERROR[main]: Lua: Runtime error from mod '' in callback on_chat_message(): ...games/minetest/games/minetest_game/mods/irc/callback.lua:34: attempt to call field 'strip_colors' (a nil value)
2018-08-27 17:17:30: ERROR[main]: stack traceback:
2018-08-27 17:17:30: ERROR[main]: ...games/minetest/games/minetest_game/mods/irc/callback.lua:34: in function <...games/minetest/games/minetest_game/mods/irc/callback.lua:22>
2018-08-27 17:17:30: ERROR[main]: /usr/share/games/minetest/builtin/game/register.lua:355: in function </usr/share/games/minetest/builtin/game/register.lua:335>

In thread 7f56b16a5780:
/build/minetest-6sh_iU/minetest-0.4.13+repack/src/server.cpp:511: void Server::step(float): A fatal error occurred: Lua: Runtime error from mod '' in callback on_chat_message(): ...games/minetest/games/minetest_game/mods/irc/callback.lua:34: attempt to call field 'strip_colors' (a nil value)
stack traceback:
...games/minetest/games/minetest_game/mods/irc/callback.lua:34: in function <...games/minetest/games/minetest_game/mods/irc/callback.lua:22>
/usr/share/games/minetest/builtin/game/register.lua:355: in function </usr/share/games/minetest/builtin/game/register.lua:335>
Debug stacks:
DEBUG STACK FOR THREAD 7f56a8968700:
#0 virtual void* EmergeThread::Thread()
(Leftover data: #1 MapBlock* ServerMap::loadBlock(v3s16))
(Leftover data: #2 void ServerMap::loadBlock(std::__cxx11::string*, v3s16, MapSector*, bool))
DEBUG STACK FOR THREAD 7f56a9169700:
#0 virtual void* CurlFetchThread::Thread()
DEBUG STACK FOR THREAD 7f56a996a700:
#0 virtual void* ServerThread::Thread()
#1 void Server::Receive()
(Leftover data: #2 void Server::SendBlocks(float))
(Leftover data: #3 void RemoteClient::GetNextBlocks(ServerEnvironment*, EmergeManager*, float, std::vector&))
(Leftover data: #4 void Server::SendBreath(irr::u16, irr::u16))
(Leftover data: #5 bool getCraftingResult(Inventory*, ItemStack&, std::vector&, bool, IGameDef*))
DEBUG STACK FOR THREAD 7f56b16a5780:
#0 int main(int, char**)
#1 Dedicated server branch
#2 void dedicated_server_loop(Server&, bool&)
#3 void Server::step(float)
2018-08-27 10:17:30: ERROR[main]: Access denied. Reason: This server has experienced an internal error. You will now be disconnected.
AL lib: (WW) FreeDevice: (0x177d7f0) Deleting 45 Buffer(s)
Aborted (core dumped)

[Documentation Update Request] Fedora compilation

Hi,

In order to install on this on Fedora 27, 28 and 29, one has to install the following packages. It may also work with previous version of Fedora but I haven't tested further.

dnf install compat-lua-devel lua-socket-compat lua-sec-compat

I also had to add the following two lines after the first line of code in init.lua:

package.path = package.path .. ";/usr/lib64/lua/5.3/?.lua"
package.cpath = package.cpath .. ";/usr/lib64/lua/5.3/?.so"

Works great! Thanks for an awesome mod!

Running shutdown command crashes game.

2017-02-21 22:57:28: ACTION[Server]: VanessaE@IRC runs shutdown as VanessaEzekowitz
2017-02-21 22:57:28: ACTION[Server]: VanessaEzekowitz shuts down server
/usr/share/minetest/builtin/game/chatcommands.lua:845: attempt to index local 'message' (a nil value)
stack traceback:
	/usr/share/minetest/builtin/game/chatcommands.lua:845: in function 'func'
	...minetest/worlds/Survival_World/worldmods/irc/botcmds.lua:74: in function 'bot_command'
	...minetest/worlds/Survival_World/worldmods/irc/botcmds.lua:28: in function 'check_botcmd'
	.../.minetest/worlds/Survival_World/worldmods/irc/hooks.lua:104: in function 'f'
	...inetest/worlds/Survival_World/worldmods/irc/irc/init.lua:71: in function 'invoke'
	.../.minetest/worlds/Survival_World/worldmods/irc/hooks.lua:64: in function 'f'
	...inetest/worlds/Survival_World/worldmods/irc/irc/init.lua:71: in function 'invoke'
	...inetest/worlds/Survival_World/worldmods/irc/irc/init.lua:202: in function 'handle'
	...inetest/worlds/Survival_World/worldmods/irc/irc/init.lua:174: in function 'think'
	...t/.minetest/worlds/Survival_World/worldmods/irc/init.lua:94: in function <...t/.minetest/worlds/Survival_World/worldmods/irc/init.lua:94>
	[C]: in function 'xpcall'
	...t/.minetest/worlds/Survival_World/worldmods/irc/init.lua:94: in function <...t/.minetest/worlds/Survival_World/worldmods/irc/init.lua:83>
	/usr/share/minetest/builtin/game/register.lua:412: in function </usr/share/minetest/builtin/game/register.lua:392>

`login` is not longer working

login has ceased to work on our servers.

Minetest server version 0.4.14 (Release)
IRC is at commit f982828

Whenever somebody tries to login from IRC (with correct username and password) this gets printed to the console:

2016-06-10_11:04:21.88915 /srv/minetest/world/worldmods/irc_commands/init.lua:63: attempt to call field 'check_password_entry' (a nil value)
2016-06-10_11:04:21.88931 stack traceback:
2016-06-10_11:04:21.88937       /srv/minetest/world/worldmods/irc_commands/init.lua:63: in function 'func'
2016-06-10_11:04:21.88943       /srv/minetest/world/worldmods/irc/botcmds.lua:55: in function 'bot_command'
2016-06-10_11:04:21.88949       /srv/minetest/world/worldmods/irc/hooks.lua:157: in function 'f'
2016-06-10_11:04:21.88955       /srv/minetest/world/worldmods/irc/irc/init.lua:71: in function 'invoke'
2016-06-10_11:04:21.88960       /srv/minetest/world/worldmods/irc/hooks.lua:66: in function 'f'
2016-06-10_11:04:21.88966       /srv/minetest/world/worldmods/irc/irc/init.lua:71: in function 'invoke'
2016-06-10_11:04:21.88971       /srv/minetest/world/worldmods/irc/irc/init.lua:202: in function 'handle'
2016-06-10_11:04:21.88976       /srv/minetest/world/worldmods/irc/irc/init.lua:174: in function 'think'
2016-06-10_11:04:21.88980       /srv/minetest/world/worldmods/irc/init.lua:85: in function </srv/minetest/world/worldmods/irc/init.lua:85>
2016-06-10_11:04:21.88994       [C]: in function 'xpcall'
2016-06-10_11:04:21.88998       /srv/minetest/world/worldmods/irc/init.lua:85: in function </srv/minetest/world/worldmods/irc/init.lua:74>
2016-06-10_11:04:21.89002       ...netest/servers/0.4.14-1/bin/../builtin/game/register.lua:369: in function <...netest/servers/0.4.14-1/bin/../builtin/game/register.lua:349>

"irc_msg <playername> ." seems to have caused a crash

A player on our BL-Pro server tried to send a PM to me on IRC from the server, and managed to get a period at the end of the command, after a space. The following is what I grepped from debug:

15:57:54: ERROR[main]: ERROR: An unhandled exception occurred: ...test/bin/../games/bluelobster_game/mods/irc/chatcmds.lua:24: attempt to index a nil value
15:57:54: ERROR[main]: stack traceback:
15:57:54: ERROR[main]:  ...test/bin/../games/bluelobster_game/mods/irc/chatcmds.lua:24: in function 'func'
15:57:54: ERROR[main]:  ...chaoswormz/minetest/bin/../builtin/game/chatcommands.lua:40: in function <...chaoswormz/minetest/bin/../builtin/game/chatcommands.lua:29>
15:57:54: ERROR[main]:  /home/chaoswormz/minetest/bin/../builtin/game/register.lua:341: in function </home/chaoswormz/minetest/bin/../builtin/game/register.lua:329>

Getting an occasional error with the IRC module

Mostly working fine, but occasionally I get the following error and I dont know what command was causing it:
ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'irc' in callback on_chat_message(): ...games/minetest/games/minetest_game/mods/irc/chatcmds.lua:50: attempt to index a nil value

Any ideas?

SSL support?

Hello,

I would like to know if the irc mod supports SSL.

From what I can grep in the code, I would say that the answer is negative:

$ grep -r "ssl"
irc/init.lua:       local work, ssl = pcall(require, "ssl")
irc/init.lua:       s = ssl.wrap(s, params)
$ grep -r "SSL"

But is there any chance to have SSL support soon?

Lots of IRC clients support connection through SSL (qwebirc, xchat, ...) and my IRC server only accepts SSL connections so unfortunately I can't use your Minetest mod because of that.

Thank you.
Best regards.

lua_api says to store the insecure environment in a local variable

https://github.com/minetest/minetest/blob/master/doc/lua_api.txt#L5355 says to store the insecure environment "IN A LOCAL VARIABLE" (and says so in all caps). However, it also says that it must be obtained in a global scope.

  1. Is the mod supposed to pass ie around to itself but set the global version of the variable to nil
  2. There is nothing more globally accessible than how the irc mod uses the ie variable currently, so it is inadvisable to keep it that way, right, or does the local declaration actually protect it even in the current scope?

Impersonation Glitch

Having the nick "IRC" can impersonate others. For example , typing " glitched" from the nick "IRC" will show as "kaeza@IRC glitches" in-game. I believe this can be fixed if messages from this nick are ignored, similarly to how messages from the server are ignored (Ex. If someone from IRC types "MT-Server, players", the people in-game do not see the list.

Error won't allow mod to run

So when I last git cloned this mod, I got this error "Unable to checkout '2296304e62412b32e77bebe5843d5cce3df73ce2' in submodule path 'irc' And I decided to open a issue and see if it's fixable.

module 'socket.core' not found

Hello,

On Slackware64 14.2, I am using:

  • lua-5.1.5
  • luasocket 316a9455b9cb4637fe6e62b20fbe05f5141fec54
  • irc 0c47e10
  • minetest-0.4.14

And here is what happens:

$ minetest 
2016-10-08 14:35:22: WARNING[Main]: Couldn't find a locale directory!
Loaded texture: /usr/share/minetest/games/minetest_game/menu/header.png
Loaded texture: /usr/share/minetest/games/minetest_game/menu/icon.png
Loaded texture: /usr/share/minetest/games/minimal/menu/icon.png
2016-10-08 14:35:25: WARNING[Main]: NodeDefManager: Ignoring CONTENT_IGNORE redefinition
2016-10-08 14:35:25: ERROR[Main]: ModError: Failed to load and run script from /home/yugiohjcj/.minetest/mods/minetestirc/init.lua:
2016-10-08 14:35:25: ERROR[Main]: /usr/share/lua/5.1/socket.lua:12: module 'socket.core' not found:
2016-10-08 14:35:25: ERROR[Main]:   no field package.preload['socket.core']
2016-10-08 14:35:25: ERROR[Main]:   no file '/home/yugiohjcj/.minetest/mods/minetestirc/socket/core/init.lua'
2016-10-08 14:35:25: ERROR[Main]:   no file '/home/yugiohjcj/.minetest/mods/minetestirc/socket/core.lua'
2016-10-08 14:35:25: ERROR[Main]:   no file './socket/core.lua'
2016-10-08 14:35:25: ERROR[Main]:   no file '/usr/local/share/lua/5.1/socket/core.lua'
2016-10-08 14:35:25: ERROR[Main]:   no file '/usr/local/share/lua/5.1/socket/core/init.lua'
2016-10-08 14:35:25: ERROR[Main]:   no file '/usr/local/lib/lua/5.1/socket/core.lua'
2016-10-08 14:35:25: ERROR[Main]:   no file '/usr/local/lib/lua/5.1/socket/core/init.lua'
2016-10-08 14:35:25: ERROR[Main]:   no file '/usr/share/lua/5.1/socket/core.lua'
2016-10-08 14:35:25: ERROR[Main]:   no file '/usr/share/lua/5.1/socket/core/init.lua'
2016-10-08 14:35:25: ERROR[Main]:   no file './socket/core.so'
2016-10-08 14:35:25: ERROR[Main]:   no file '/usr/local/lib/lua/5.1/socket/core.so'
2016-10-08 14:35:25: ERROR[Main]:   no file '/usr/local/lib/lua/5.1/loadall.so'
2016-10-08 14:35:25: ERROR[Main]:   no file '/usr/lib/lua/5.1/socket/core.so'
2016-10-08 14:35:25: ERROR[Main]:   no file './socket.so'
2016-10-08 14:35:25: ERROR[Main]:   no file '/usr/local/lib/lua/5.1/socket.so'
2016-10-08 14:35:25: ERROR[Main]:   no file '/usr/local/lib/lua/5.1/loadall.so'
2016-10-08 14:35:25: ERROR[Main]:   no file '/usr/lib/lua/5.1/socket.so'
2016-10-08 14:35:25: ERROR[Main]: stack traceback:
2016-10-08 14:35:25: ERROR[Main]:   [C]: in function 'require'
2016-10-08 14:35:25: ERROR[Main]:   /usr/share/lua/5.1/socket.lua:12: in main chunk
2016-10-08 14:35:25: ERROR[Main]:   [C]: in function 'require'
2016-10-08 14:35:25: ERROR[Main]:   ...home/yugiohjcj/.minetest/mods/minetestirc/irc/init.lua:1: in main chunk
2016-10-08 14:35:25: ERROR[Main]:   [C]: in function 'require'
2016-10-08 14:35:25: ERROR[Main]:   /home/yugiohjcj/.minetest/mods/minetestirc/init.lua:36: in main chunk
2016-10-08 14:35:25: ERROR[Main]: Check debug.txt for details.

What am I doing wrong please?

Thank you.
Best regards.

Only one player in chown on the IRC channel

Hello,
On my server, I am the only player that is shown on the IRC channel. Meaning that:

  • The messages said in-game appear on IRC only if they are said by me;
  • The messages "* [player] joins the game" and "* [player] left the game" appear only if I was the player.

However, everyone is able to send messages using /irc_msg.

Could you help me ? Sorry for my bad english...
Thank you, paly2

Username for connection

Hi there!

Is there any particular reason why the username isn't the same as the configured nick? Or at least its own setting?

Cheers

attempt to perform arithmetic on local 'space' (a nil value)

Hi there, i just noticed the following error on minetest startup:

worldmods/irc/irc/messages.lua:100: attempt to perform arithmetic on local 'space' (a nil value)
stack traceback:
       worldmods/irc/irc/messages.lua:100: in function 'fromRFC1459'
       worldmods/irc/irc/messages.lua:12: in function 'Message'
       worldmods/irc/irc/init.lua:174: in function 'think'
       irc/init.lua:85: in function <worldmods/irc/init.lua:85>
        [C]: in function 'xpcall'
        worldmods/irc/init.lua:85: in function <worldmods/irc/init.lua:74>
       /home/minetest/minetest/bin/../builtin/game/register.lua:369: in function </home/minetest/minetest/bin/../builtin/game/register.lua:349>

The mod, and minetest are working but i guess it wouldn't be wrong to report it anyway. :)

Lua 5.1.5

Ubuntu 20.04 "could not make secure connection: no protocols available"

This mod uses LuaIRC which hard codes the deprecated protocol tlsv1 for secure connections. As of Ubuntu 20.04, tlsv1 is no longer available. I have added a pull request to the upstream LuaIRC project which fixes this problem.

JakobOvrum/LuaIRC#36

In the meantime, to workaround this problem, users can edit irc/irc/init.lua and change line 111 from

params = {mode = "client", protocol = "tlsv1"}

to

params = {mode = "client", protocol = "any"}

!player command

!player command runs all names together.

IE:

Available commands: whereis, help, list, players, uptime, -- Use 'help ' to get help about a specific command.
!players
Connected players: Sokominedaddy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.