egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Are custom ban formats with +ban possible?

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
dopeghoti
Voice


Joined: 29 Mar 2010
Posts: 3

PostPosted: Mon May 23, 2011 1:30 am    Post subject: Are custom ban formats with +ban possible? Reply with quote

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:
/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:
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.
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Mon May 23, 2011 11:46 am    Post subject: Reply with quote

Unfortunately, those kinds of bans are not supported by eggdrop natively. You'll need to implement that through scripting.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
dopeghoti
Voice


Joined: 29 Mar 2010
Posts: 3

PostPosted: Tue May 24, 2011 2:17 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Tue May 24, 2011 2:45 pm    Post subject: Reply with quote

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, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber