Is there any way to 'capture' the action the bot takes when a user joins and matches a ban on the ban list (with dynamicbans enabled)? I'm thinking of something similar to the FLUD bind, something i can use to replace the action the bot takes when it finds a match.
If that wasn't a sufficient explanation, maybe this is a better description of my situation:
1. I have dynamicbans enabled so i don't have to clog up the channel ban list with bans that aren't needed. More 'necessary' bans are set through a different mechanism that bypasses the internal ban list.
2. I want the bot to (temporarily) add a ban to the channel ban list when it detects a user who matches a mask in the internal ban list, however i do NOT necessarily want the bot to add that SAME mask from the ban list.
As an example, suppose i add someuser*!*@* to the ban list. The normal behaviour of eggdrop when it detects someone with this host mask will be to add a ban to the channel ban list exactly as it appears above — someuser*!*@*. Instead, i would like the bot to use the internal mask to MATCH but use a DIFFERENT mask to actually set the channel ban (e.g., *!*somecurrentident@somecurrenthost).
3. I do not want to bypass the internal ban list, if possible, nor do i want the desired action to occur 'on top of' the default action. I want to completely replace it.
Is this possible? Or are there any other ideas i should consider? I've looked through the TCL archive but didn't find anything suitable.
You're pretty much looking for a ban mask script, there are ALOT of them out there. Search the TCL Archive or google for one. These type of script do what your asking.
There's really no way to "over ride" or "by pass" Eggdrop's ban system, its what its there for. Eggdrop's ban system is pretty much a core feature. You could try making a script that uses the user file system and goes off user flags to create a new ban system. This is already done with the +k user flag (auto-kick) as well. Maybe try a differant bot, or script a mIRC bot to do this. would be my advice, if all else fails. (P.S ChanServ's akick system seems round-a-bout what your asking about as well)
Also, if you really are looking for a way to check if someone matches a ban in the internal ban list
matchban <nick!user@host> [channel]
Returns: 1 if the specified nick!user@host matches a ban in the global
ban list; 0 otherwise. If a channel is specified, that channel's ban
list is checked as well.
Module: channels
And just "re-work" the ban to use the correct ban mask (like a few ban rite scripts do (again TCL Archive))
Give Black List a shot. It supports setting a specific banmask instead of using the one in the banlist but it uses a separate banlist stored in a file instead of Eggdrop's internal banlist.
> You're pretty much looking for a ban mask script, there are ALOT of them out there. Search the TCL Archive or google for one. These type of script do what your asking.
Feel free to point out something specific if i'm just an idiot, but as i said i already checked the archive and none of the ones i looked at did what i want. :/
> There's really no way to "over ride" or "by pass" Eggdrop's ban system, its what its there for.
Well, i'm not really looking to override or bypass it, i just want to change the final action it performs. eggdrop gives you the ability to do exactly this when flood-protection kicks in, so it doesn't seem like such a leap....
> P.S ChanServ's akick system seems round-a-bout what your asking about as well
No, unfortunately ChanServ's AKICK functions exactly like eggdrop's default behaviour. ... In fact, not wanting to use AKICK is the whole reason i want to go the bot route in the first place!
@Sir_Fz, i noticed that earlier, and it does seem like one of the better options. I definitely would like to avoid going around eggdrop's internal list... but i suppose if there's no other way i might end up using Black List. :)
##
# Ban Mask v1.4.3
# by MC_8 - Carl M. Gregory <mc8@purehype.net>
# This script will only run on eggdrop 1.6.13 or greater.
# This script will only run with TCL 8.4 or greater
# (due to a bug in prev. tcl versions).
#
# R.I.P. Mom, To always be remembered; Nancy Marie Gregory.
#
# My Website - http://mc.purehype.net/
# Have a bug or script not working correctly?
# http://mc.purehype.net/bugzilla/
# Have a question?
# http://forum.purehype.net/viewforum.php?f=5
##
##
# Description
##
# This script will ban people matching the specific ban-mask. Sure, you can
# just use +ban to do such things, but the advantage with doing it this way is;
# 1) Can setup a ban-mask via this script, but have it mask the actual ban
# differently, as to not reveal how the ban is masked, therefor making it
# so it's harder to do a ban evasion.
# 2) You can do regular expression type ban masking, as well as the
# traditional glob style.
##
##
# Commands (dcc)
##
# banmask [channel|'all']
# This will show you a list of current banned masks.
#
# +banmask [channel] <nick!ident@host | *word*> [reason]
# This will add a new mask ban.
#
# -banmask [channel] <nick!ident@host | *word*>
# This will remove a mask ban.
#
# If you do not specify [channel] it will be considered as global.
# <nick!ident@host | *word*> can contain wild cards.
#
# chanset [channel] <+/->mc.banmask
# Setting this will enable, +, or disable, -, the script for the given
# channel.
##
##
# Configuration
##
#
# What flagged users can use the dcc commands?
set mc_banm(:config:access) "o|o"
# What flagged users do you want the script to ignore? Set to
# "" to ignore no one.
set mc_banm(:config:ig:flag) "b|"
# What do you want to call the datafile?
set mc_banm(:config:datafile) ".banm.dat"
# If someone is found with a bad mask, what do you want the script to do?
# -3 = /NOTICE Warn
# -2 = /MSG Warn
# -1 = Kick
# 0 = Server Ban
# 1 and up is ban time in min's.
set mc_banm(:config:pre:pun) -3
# If the above setting is -3, -2, or -1, how long (in sec.s) do you want to
# give the user before scanning them again? Set this to 0 to disable.
set mc_banm(:config:warn:time) 60
# If the user is still in violation after the re scan (if enabled), what do
# you want the script to do?
# -1 = Kick
# 0 = Server Ban
# 1 and up is ban time in min's.
set mc_banm(:config:post:pun) 5
# How do you want to mask the bans?
# 0 - *!user@host.domain
# 1 - *!*user@host.domain
# 2 - *!*@host.domain
# 3 - *!*user@*.domain
# 4 - *!*@*.domain
# 5 - nick!user@host.domain
# 6 - nick!*user@host.domain
# 7 - nick!*@host.domain
# 8 - nick!*user@*.domain
# 9 - nick!*@*.domain
# You can also specify a type of 10-19 which corresponds to types 0-9,
# using this sub rule; If host.domain is a(n)-
# name - Instead of using a * wildcard to replace portions of the
# host.domain, it replaces the numbers in the host.domain with a
# '?' (question mark) wildcard.
# ip - It will mask as normal, with no '?' (question mark)
set mc_banm(:config:banmask) 3
# [0=no/1=yes] Do you want to use regular expression matching rather than
# normal wild carded matching? Warning, regular expressions are advanced.
# If you don't know how to use regular expressions... do not turn this on.
# http://tcl.activestate.com/man/tcl8.3/TclCmd/re_syntax.htm#M2
# http://dev.scriptics.com/doc/howto/regexp81.html
set mc_banm(:config:use:regexp) 0
## SVS Client (Script Version Service) v4.1.2 ##
# Once a day, the SVS Client will connect to MC_8's SVS Server to determine if
# there is a newer version of this script available. If a newer version is
# found, the script will be auto updated.
# [0=no/1=yes] Do you want to enable auto updating? If you chose to disable
# auto updating, it will not automatically update the script upon finding a
# newer version.
set mc_banm(:config:svs:enable) 1
##
# Done with configurations, do not edit past here unless you know TCL.
##
#
you could add a user "evilguy" (.+user) with the +k flag (.chattr) for the channel, then add all hostmasks (.+host) you want to ban to that user, eggdrop will use the default masking to ban the user instead of the host that caused him to be recognized as "evilguy" (which is something like *!*ident@*.domain.tld)