Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes server if using the --terminal option and chat #623

Closed
grantcarthew opened this issue May 8, 2020 · 5 comments
Closed

Crashes server if using the --terminal option and chat #623

grantcarthew opened this issue May 8, 2020 · 5 comments

Comments

@grantcarthew
Copy link

Hi,
I have raised this issue with the afkkick mod however it is also an issue here.

Rather than duplication the details, I'll reference the issue in the afkkick mod.

GunshipPenguin/afkkick#4

@ClobberXD
Copy link
Contributor

ClobberXD commented May 8, 2020

This issue indeed seems to be caused by playerName being nil. A simple if-playerName-then check ought to fix this crash. i.e.

minetest.register_on_chat_message(function(playerName, message)
+	-- Verify that there is a player, and the player is online
+	if not playerName or not minetest.get_player_by_name(playerName) then
+		return
+	end
	players[playerName]["lastAction"] = minetest.get_gametime()
end)

OTOH, it seems pretty inconsistent of Minetest to pass a nil value here - I'd expect the value of the setting name (this is the name the terminal chat functions under) to be passed in.

@grantcarthew
Copy link
Author

Does this mod get synced with the source mod at @GunshipPenguin?

@ClobberXD
Copy link
Contributor

ClobberXD commented May 8, 2020

AFAIK, no. There doesn't seem to be any new commits, apart from GunshipPenguin/afkkick#3 which was backported from CTF. CTF's version, however, is a little more active, and has gone through the following changes:


Given that we don't sync with upstream, I think it's a good idea to fix this crash in CTF itself.

@grantcarthew
Copy link
Author

Ok.
Seems a shame to have duplicates.
I found this today: https://github.com/minetest-mods/
Instructions here: http://minetest-mods.github.io/

Maybe it is worth getting it supported under there? Then import the module into CTF? Just a suggestion.

@ClobberXD
Copy link
Contributor

Thanks for reporting this crash. Fixed in 3de7c43.

Beanzilla pushed a commit to Beanzilla/afkkick that referenced this issue Jul 22, 2021
  It was found that in the CTF repo they fixed this issue... but we just
simply didn't apply the fix they did.

  This was fixed in their repo as issue [623](MT-CTF/capturetheflag#623)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants