[DONE] Timed channel bans

Need a module converted from 3.2.x to UnrealIRCd 4? Or looking for a certain module? Ask here.

Moderators: Gottem, Supporters

Post Reply
Gottem
Posts: 133
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

[DONE] Timed channel bans

Post by Gottem » Wed Jul 26, 2017 9:28 pm

A much requested feature. =] Allows you to give channel bans (+b etc) an expiration time, using extbans. ;] Since it's integrated with channel mode +b, you need halfops or higher to be able to use it. The resolution for the expiration time is 1 minute; less than that seems useless to me anyways. Also, the module doesn't check for expirations every second (does every 15 though). It unsets as many bans per "line" as possible (either 8 masks or a total char length of >= 200).

I tested this across 30 channels with 48 bans for each, it walks through them in less than a second. ;];];]

Usage:
Simply do /mode #chan +b ~t:<EXPIRATION>:<BANMASK>

The banmask is your regular wildcard-enabled nick!user@host mask. Expiration is a "timestring" (see below). Also, if you add a banmask which Unreal already knows it will emit an error. I'm not replacing bans simply because a person (and not some code ;]) should decide which expiration time should be active.

Examples:
  • /mode #chan +b ~t:60:Guest*!*@*
  • /mode #chan +b ~t:1h5m:Guest*!*@*
  • /mode #chan +b ~t:3d4h1m:Guest*!*@*
Bans the same people, but with different expirations.

Get it here.
If you like my modules, pls consider donating (through PayPal) or becoming a monthly Patron ;];]

dEathLeSs
Posts: 3
Joined: Mon Apr 10, 2017 2:35 pm

Re: [DONE] Timed channel bans

Post by dEathLeSs » Mon Jul 31, 2017 11:48 am

-o m_timedbans.so m_timedbans.c
m_timedbans.c: In function ‘expirem’:
m_timedbans.c:200: warning: not protecting local variables: variable length buffer
m_timedbans.c: In function ‘timedbans_event’:
m_timedbans.c:155: warning: not protecting local variables: variable length buffer
m_timedbans.c: In function ‘timedbans_extban_isok’:
m_timedbans.c:87: warning: not protecting local variables: variable length buffer


*** /home/ircgovde/unrealircd/conf/unrealircd.conf:159: loadmodule third/m_timedbans: failed to load: Cannot open module file: No such file or directory

Gottem
Posts: 133
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

Re: [DONE] Timed channel bans

Post by Gottem » Mon Jul 31, 2017 1:13 pm

You should really learn how to properly report errors. Just dumping the error output (as you always do) is not enough:
  • What exact operating system/distribution are you on? I know it's some flavour of UNIX but there may be major differences between distros.
  • How are you compiling? What commands are you running, and from what directory?
  • Are there any other, perhaps special, circumstances? Think of stuff like embedded systems, limited permissions, etc.
Also, these are merely warnings (not errors) so they shouldn't even prevent compilation of the module. I've seen you struggling with Unreal and/or its modules before, so I have the feeling you're doing something you're not supposed to. Especially since the module compiles just fine on all my systems, without any warnings.

Go here to read how to properly compile 3rd party modules
If you like my modules, pls consider donating (through PayPal) or becoming a monthly Patron ;];]

dEathLeSs
Posts: 3
Joined: Mon Apr 10, 2017 2:35 pm

Re: [DONE] Timed channel bans

Post by dEathLeSs » Tue Aug 01, 2017 6:11 am

Thank you. Problem solved .. :)

Post Reply