Open ClobberXD opened 6 years ago
I've been thinking about removing that command. I'll accept a PR.
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?
Sure.
definitely worth doing
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
.user.nick
), and stores an access
table, with boolean flags for user-mode +o
and +v
.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?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.
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...
How about removing this command from irc
altogether? Commands like these should ideally be a part of MT itself.
minetest/minetest#7677 :)
I've abandoned this, and the aforementioned PR in MT has been rejected. Anyone else interested is welcome to take this up.
(Originally reported here: rubenwardy/capturetheflag#107)
I suggest restricting
!whereis
to chan OPs if possible.Will work on implementing this if approved.