You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had some "abuse" of Factoids via people in a channel, mainly those not voiced or opped. nyuszika7h helped me add some code into plugins/Factoids/plugin.py like:
if self.registryValue('requireVoice', channel):
if not irc.state.channels[channel].isOp(msg.nick) and \
not irc.state.channels[channel].isVoice(msg.nick):
irc.error('You must be at least voiced')
return
(add around line 152 after (keyid, factid) = self._getKeyAndFactId(channel, key, factoid) )
with (from config.py):
conf.registerChannelValue(Factoids, 'requireVoice',
registry.Boolean(True, """Only allows a user with voice or above on a
channel to use the command."""))
I figure this could be added to each crud operation (learn, forget) and maybe also have a configuration to only allow ops in a channel?
I wanted to submit the idea for further consideration.
Thanks.
The text was updated successfully, but these errors were encountered:
It's a small channel but adding in of a lot of spam into the database. I didn't mean abuse as being hacked or someone exploiting sql injection of some sort. Since the trusted people in the channel are either voice or op, I wanted to keep that enforced because the default setup allowed anyone in the channel to add.
I didn't add in half-op since I don't think efnet ircd supports it? I am unaware of if it's considered above or below voice.
Hi,
I had some "abuse" of Factoids via people in a channel, mainly those not voiced or opped. nyuszika7h helped me add some code into plugins/Factoids/plugin.py like:
(add around line 152 after (keyid, factid) = self._getKeyAndFactId(channel, key, factoid) )
with (from config.py):
conf.registerChannelValue(Factoids, 'requireVoice',
registry.Boolean(True, """Only allows a user with voice or above on a
channel to use the command."""))
I figure this could be added to each crud operation (learn, forget) and maybe also have a configuration to only allow ops in a channel?
I wanted to submit the idea for further consideration.
Thanks.
The text was updated successfully, but these errors were encountered: