[IRCServices] feature info

Andrew Church achurch at achurch.org
Sun Apr 30 22:36:25 PDT 2006


>I'm using Unreal, and the problem is that I want to be able to use
>time-specified bans (or akicks), but have chanserv expire them after the
>time's up. So that a channel op can set a 2 hour ban, or 3 day ban to deal
>with minor disruptive conduct, and the limit will be honored and doesn't
>rely on the op remembering to turn the ban off when it expires 3 days later.
>What I'd *really* like is an extended AKICK option format:

     I'll think about this for 5.1, but in the meantime (particularly since
I'm busy with other obligations and won't be able to work on Services for a
while) you may want to look at the AKILL/SQLINE/etc. ADD command processing
in modules/operserv/maskdata.c, which recognizes a "+<time>" initial
parameter as an expiration time.  You'll also need to modify the autokick
structure, obviously; for 5.0, this will break your databases unless you
change the database version and add code in modules/database/version4.c to
handle the version differences (5.1 takes care of all this automatically).
You may want to ask on the coding list for more help.

>As a further comment on AKICK, it'd be nice (if possible) if it listed bans
>by number (like memos are listed), so that one didnt have to retype the mask
>but could just replace <mask> by <number> in AKICK commands, if desired.

     As a rule, I'm trying to stay away from numbered lists where possible.
Particularly in the case where the lists can get renumbered after adds or
deletions, you can get unexpected behavior:

(User1 -> ChanServ) AKICK #channel LIST
(ChanServ -> User1) Autokick list for #channel:
(ChanServ -> User1)     1  *@some.host.com
(ChanServ -> User1)     2  *@minor.annoyance.org
(ChanServ -> User1)     3  *@deadly.cracker.net
[User1 starts typing "AKICK...", intending to delete *@some.host.com]
(User2 -> ChanServ) AKICK #channel LIST
(ChanServ -> User2) Autokick list for #channel:
(ChanServ -> User2)     1  *@some.host.com
(ChanServ -> User2)     2  *@minor.annoyance.org
(ChanServ -> User2)     3  *@deadly.cracker.net
[User2 starts typing "AKICK...", intending to delete *@minor.annoyance.org]
(User1 -> ChanServ) AKICK #channel DEL 1
(ChanServ -> User1) *@some.host.com deleted from #channel autokick list.
(User1 -> ChanServ) AKICK #channel LIST
(ChanServ -> User1) Autokick list for #channel:
(ChanServ -> User1)     1  *@minor.annoyance.org
(ChanServ -> User1)     2  *@deadly.cracker.net
(User2 -> ChanServ) AKICK #channel DEL 2
(ChanServ -> User2) *@deadly.cracker.net deleted from #channel autokick list.

     This can be avoided by attaching unique numbers to each autokick, but
then you can get lists like 5, 13, 28... with holes in the sequence, plus
you have an extra field that you have to deal with loading and saving.  If
you made the ID non-numeric, you wouldn't have to worry about the oddity of
holes in the sequence--but then why not just use the mask itself as the ID?
That saves the trouble of keeping track of an extra field as well.

     That's my reasoning behind not using numbered lists.  That, plus it's
really not that hard to type the mask in, or even copy and paste, for the
comparatively infrequent occasions you need the command...

  --Andrew Church
    achurch at achurch.org
    http://achurch.org/