This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Are custom ban formats with +ban possible?

General support and discussion of Eggdrop bots.
Post Reply
d
dopeghoti
Voice
Posts: 3
Joined: Mon Mar 29, 2010 5:55 pm

Are custom ban formats with +ban possible?

Post by dopeghoti »

I am administering a bot on an IRC network that allows for custom ban hostmask to ban based on IRC network services accounts. For example, I could register an account under DopeGhoti and even if I set my nick to Barney, Betty, Fred, or Wilma, the network knows it's my account (regardless of actual hostnask and ident) once I've signed in with the network services. If someone wanted to ban me, they would run the following:

Code: Select all

/mode #channel +b $a:DopeGhoti
I am trying to have my bot start using such bans, but when I do so with +ban, the bot is "helping" me by adding '!*@*' to the ban entry, which causes it not to work. For example:

Code: Select all

22:02 <dopeghoti> .+ban $a:testing #channel
22:02 <bot> [22:02] #DopeGhoti# (#channel) +ban $a:testing!*@* #channel (requested)
Is it possible to get it to do what I want it to without writing a custom script? I was hoping to still take advantage of the built-in ban system and it's ban expiration and such.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Unfortunately, those kinds of bans are not supported by eggdrop natively. You'll need to implement that through scripting.
NML_375
d
dopeghoti
Voice
Posts: 3
Joined: Mon Mar 29, 2010 5:55 pm

Post by dopeghoti »

That's really a shame. More IRC networks are using custom hostmasks like that, ant not supporting this reduces the utility of the Eggdrop bot.

Short of writing a complete from-scratch implementation of a separate bans database, what would be the most expedient way to replicate this behaviour, do you think?

Certainly, overloading the +ban/-ban commands would be a fool's errand, but where could I find the native code for these commands to implement either as a TCL script or possible as a loadable module that I could use with the modifications I need to the hostmask assignments?
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

The first problem, how would an eggdrop be able to match a banmask such as $a:DopeGhoti to any member of the channel?
Currently, eggdrop builds an internal list of channel members using the NAMES and WHO commands; thus eggdrop only know the nickname, ident, and hostname. Gaining any further information would require additional commands to be sent, which won't scale nicely with larger channels...

Next, they're extensions.. meaning they can have different support on different networks - in some cases conflicting interpretations over networks. In older days, adding support for every possible "feature" was a big no-no (can't say these days, as it's been a long time since I was involved in the actual development of eggdrop), though if the extension is common and useful enough - someone will start making patches to support it.. and it might be included in the official releases. The halfop extension is a pretty good example of this.

As for the source of the ban commands - they're mainly located within the channels-module, providing both the dcc .+/-ban commands, as well as the tcl counterparts (newban, delban, etc)
NML_375
Post Reply