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

!whereis can be misused by players on Survival / PvP servers #48

Open
ClobberXD opened this issue Jul 12, 2018 · 9 comments
Open

!whereis can be misused by players on Survival / PvP servers #48

ClobberXD opened this issue Jul 12, 2018 · 9 comments

Comments

@ClobberXD
Copy link
Contributor

ClobberXD commented Jul 12, 2018

(Originally reported here: MT-CTF/capturetheflag#107)

I suggest restricting !whereis to chan OPs if possible.

Will work on implementing this if approved.

@kaeza
Copy link
Member

kaeza commented Jul 12, 2018

I've been thinking about removing that command. I'll accept a PR.

@ClobberXD
Copy link
Contributor Author

In my opinion, !whereis is still useful for server staff... Shall I try to restrict that command to chan OPs as mentioned in my previous comment?

@kaeza
Copy link
Member

kaeza commented Jul 12, 2018

Sure.

@sofar
Copy link
Member

sofar commented Aug 16, 2018

definitely worth doing

@ClobberXD
Copy link
Contributor Author

Figured out how to get it to work, but I'm facing a (minor?) issue:

  • irc.conn.channels[irc.config.channel] contains a table of users in the channel, called users.
  • Each user in the table is indexed by their nick (user.nick), and stores an access table, with boolean flags for user-mode +o and +v.
  • The issue here is that the user's access table users[user.nick].access is empty. Am I missing something? Do I have to invoke some sort of an update function before accessing the table?

@kaeza
Copy link
Member

kaeza commented Aug 16, 2018

From https://github.com/JakobOvrum/LuaIRC/blob/master/doc/irc.luadoc :

Apart from nick , fields may be missing. To fill them in, enable user tracking

And

Turn user information tracking on or off. User tracking is enabled by default.
param b Boolean whether or not to track user information.
function irc:trackUsers(b)

Either that, or track modes yourself with the OnUserMode callback.

That's what I get from a quick look at the docs and code, but you should probably ask upstream.

@ClobberXD
Copy link
Contributor Author

User tracking is enabled by default.

If tracking is set to true by default (and it really is enabled, I checked), then this most likely is an upstream bug.

I initially did plan on using OnUserMode callback. I'll see if that works...

@ClobberXD
Copy link
Contributor Author

ClobberXD commented Aug 25, 2018

How about removing this command from irc altogether? Commands like these should ideally be a part of MT itself.

minetest/minetest#7677 :)

@magnetar47
Copy link

magnetar47 commented Aug 13, 2022

I've abandoned this, and the aforementioned PR in MT has been rejected. Anyone else interested is welcome to take this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants