-
-
Notifications
You must be signed in to change notification settings - Fork 93
Description
I would like to request the ability to create a Tcl function that can be given a full address (and possibly other context during a bind event--e.g. channel) and will return a user handle that Eggdrop will then use for its own purposes (e.g. to determine if a nickname/handle has particular flags--autovoice/autoop/friend etc.).
The purpose of this is to enable the possibility of scripting "persistent authorization". Currently, this is only possible by a hacky solution: adding an exact address (nick!ident@host.domain) to the relevant handle, and carefully tracking part/quit events (including those of the bot)--and this assumes no botnet master/owner will ever add a precise "nick!ident@host.domain" (i.e. with no wildcards).
Thommey gives the impression this could be possible in this IRC conversation:
Jinx Is there any way to intercept the function that determines what the user is? (i.e. whatever core/C code is behind the [nick2hand] and similar functions)
Jinx or perhaps better put: is there any way (in Tcl) to get Eggdrop to treat a given nick as if it's a given handle?
** Jinx wants to make a "Persistent Auth" system
Jinx but the only way i can think to do it is messy: add an exact address nick!ident@host.domain to the authed handle (and track part/quit to remove that address--hoping nobody would ever actually add an exact address like that outside of this script)
thommey we talked about it but no
thommey easy to patch eggdrop though
thommey after the account stuff it is a single function
thommeyhttps://github.com/eggheads/eggdrop/blob/7c76498d1517fd424fef033226a23e53002135e2/src/userrec.c#L286
thommey if we were to provide that hook it would be in that function (m->user is a cache for the lookup)
Jinx worth a feature request? :)
thommey yes