auto removal of bans
Elián Hanisch
lambdae2 at gmail.com
Sat Jul 28 00:54:18 UTC 2012
The feature is mostly complete, there are two things missing:
* make the bot op and deop when needed, for now it needs to be always opped
for remove bans.
* once a ban is set for auto removal, you can't later go back and make the it
permanent. You can however change the ban duration so it won't be removed
until a very long time.
I did like everyone to test the feature with scratDev in #ubuntu-bots-test,
just go there and set some bans and quiets. Report any bugs you find and ping
me for questions.
= How to set bans/quiets to expire =
I modified the command @comment, you can use it as always but now it can set
the ban duration or comment several bans a the same time:
@comment <id>[,<id> ...] [<comment>][, <duration>]
As you can see, the "duration" is whatever is behind the last comma, if the
syntax is wrong then it will just comment the ban as always.
<duration> uses the time units years, months, weeks, days, hours and minutes,
it uses fuzzy matching so you can write the partial word or just the first
letter. The only clash is with 'm', so 'M' stands for month and 'm' for
minute.
duration examples:
1 month 2 weeks 5 min
1M 2w 5m
1M2w5m
(the 3 are equivalent)
command examples:
@comment 123 this is a temporal ban, 2d
@comment 124,125,126 troll, ban evading, etc, 2 weeks
@comment 127 this ban will not expire, because no duration was given.
The <duration> part is not stripped from the comment, so it will show in the
bantracker. And note that even though you can set a ban to expire in 1 minute,
it will might take longer to be removed since the time between checks are 10
minutes apart.
For show or change the ban duration I added the command @duration:
@duration [<id>[,<id> ...]] [<duration>]
It sets or changes the duration of a ban. If you don't give a duration the bot
will reply how much time the ban has left until is removed, if you don't
either give an id the bot will reply which bans are set to expire.
command examples:
@duration 123 2d
@duration 123,124,125 2 weeks
The bot will send a notification 10 minutes before removing a ban.
That's all, please test.
--
~ m4v
https://launchpad.net/~m4v
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-irc/attachments/20120727/0c89045e/attachment.html>
More information about the Ubuntu-irc
mailing list