Open damascene opened 8 years ago
There's no standard way of setting quiets that works on all IRCds. Charybdis style uses +q *!*@host
, InspIRCd uses +b m:*!*@host
, and UnrealIRCd uses +b ~q:*!*@host
. I assume there are others which don't support quiet at all.
Support for this should look at the IRCd being used (possibly in core as an ircmsgs.quiet
command?). It's a nice idea though.
You could always watch for CHANMODES
.
CHANMODES=eIbq,k,flj,ACFLOPQScgimnprstz
That doesn't tell which extban format to use.
Could watch for EXTBANS in VERSION? If not possible, it shouldn't be hard to init a variable to return the ircd type/version, say InspIRCd- or UnrealIRCd etc. if it catches it on connect it shouldn't be too hard to add that functionality
I prefer not to have code that uses a fancy non-standard feature of an IRCd. Allowing arbitrary modes would make it work on any server, even ones with exotic modes.
Well, should it be config option? plugins.BadWords.quiet_string or what are you suggesting as in 'arbitrary modes'
Arbitrary modes.
AttackProtector already supports those.
This could probably be in some format, like if using +q on freenode, it would be Something like,
method = self.registryValue(channel, 'method'
action = self.registryValue(channel, 'trigger_action')
# and lets say they put '+q'
if c.isHalfopPlus(msg.nick) or \
ircdb.checkCapability(msg.prefix, cap):
# ... current code
elif method == 'mode':
# that variable would then translate down here
banmaskstyle = conf.supybot.protocols.irc.banmask
banmask = banmaskstyle.makeBanmask(prefix)
ircmsgs.mode(channel, '%s %s %s' % (method, action, banmask))
Of course that's just a stub of what it could be.
It could also be
ircmsgs.mode('channel', '%s %s%s%s' % (method, action, needsSpace, prefix))
also granted, action and prefix could be combined depending on if there is a positive(read: true) value for it, like 'plugins.BadWords.action.actionNeedsSpace
'
It would be useful to fight spam and abuser by having an option to set quiet instead of just kicking out.
the command to set quite could be used to quite both the host and the user name (not to be confused with nick) like this in line 90 BadWords/plugin.py:
Currently it is:
You can add:
as abusers and spammers use to change their host quickly they will now have to change their username too which makes it more difficult for them