Official Forum for the HOMETOWN Minetest game server.

Local chat

If you've seen something awesome that we may enjoy on HOMETOWN... please let us know about it.
user2 wrote:
Sat Mar 10, 2018 11:07 am
This wouldn't work on other servers but actually would work on this server because on this server "minetest.get_player_names" returns only the players that are actually visible (notice that on this server nametags are hidden beyond a certain distance - I have no idea how this is implemented without the player join and leave messages appearing in the client's chat but it does affect the CSM function).
So I guess my idea would be impossible without the CSM calling /status and all that...
random_geek wrote:
Sat Mar 10, 2018 5:11 pm
user2 wrote:
Sat Mar 10, 2018 11:07 am
This wouldn't work on other servers but actually would work on this server because on this server "minetest.get_player_names" returns only the players that are actually visible (notice that on this server nametags are hidden beyond a certain distance - I have no idea how this is implemented without the player join and leave messages appearing in the client's chat but it does affect the CSM function).
So I guess my idea would be impossible without the CSM calling /status and all that...
Interestingly enough /status is unaffected by this particular server's hiding of distant nametags, just the CSM function is. So you could use the CSM function but it would only work on this server.
user2 wrote:
Sat Mar 10, 2018 10:11 pm
Interestingly enough /status is unaffected by this particular server's hiding of distant nametags, just the CSM function is. So you could use the CSM function but it would only work on this server.
Yep. I meant to get all players online, you would need /status. Not impossible to implement in a CSM, but more complicated than the built-in function.
I'm pretty sure in 0.5.0 CSM will have access to all player names. So using that to have a chat range will become obsolete in future. Not to mention you'd have to send people PMs, which would get spammy and result in hitting the message limiter quite easily.
ChimneySwift wrote:
Sun Mar 11, 2018 4:31 am
I'm pretty sure in 0.5.0 CSM will have access to all player names. So using that to have a chat range will become obsolete in future. Not to mention you'd have to send people PMs, which would get spammy and result in hitting the message limiter quite easily.
minetest.after()?
random_geek wrote:
Sat Mar 10, 2018 11:18 pm
user2 wrote:
Sat Mar 10, 2018 10:11 pm
Interestingly enough /status is unaffected by this particular server's hiding of distant nametags, just the CSM function is. So you could use the CSM function but it would only work on this server.
Yep. I meant to get all players online, you would need /status. Not impossible to implement in a CSM, but more complicated than the built-in function.
I'm not sure what you're getting at here. With regards to implementing a "local chat" CSM:

On this server:
  • /status gives all online players
  • CSM minetest.get_player_names function gives nearby players (those with a visible nametag)
On other servers:
  • /status gives all online players
  • CSM minetest.get_player_names gives all online players
So on this server you could implement local chat by using minetest.get_player_names. On other servers it is not possible. With regards to implementing a local chat CSM, there's no need to get all online players so no need to use /status.
ChimneySwift wrote:
Sun Mar 11, 2018 4:31 am
I'm pretty sure in 0.5.0 CSM will have access to all player names.
Noice

user2 wrote:
Sun Mar 11, 2018 4:45 pm
I'm not sure what you're getting at here. With regards to implementing a "local chat" CSM:
Yep, I guess I was off topic; I was talking about a non-local (all players online) sort of CSM to add a nice GUI.
*recedes to corner in shame*
random_geek wrote:
Sun Mar 11, 2018 6:56 pm
user2 wrote:
Sun Mar 11, 2018 4:45 pm
I'm not sure what you're getting at here. With regards to implementing a "local chat" CSM:
Yep, I guess I was off topic; I was talking about a non-local (all players online) sort of CSM to add a nice GUI.
*recedes to corner in shame*
That makes more sense. I assumed that we were still talking about, you know, local chat.

Such a CSM would work on other servers but not on this server by using minetest.get_player_names (although I think that's quite clear by now).

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 23 on Wed Mar 14, 2018 2:43 am

Users browsing this forum: No registered users and 2 guests