insobot icon indicating copy to clipboard operation
insobot copied to clipboard

mod_whitelist nickserv support / defer system

Open baines opened this issue 8 years ago • 1 comments

It might be nice to allow whitelist / admin entries that are based on nickserv usernames instead of nicknames. This way, people who change nick would not need to be re-added, and it would ensure impersonators could not elevate their privileges.

The 'ACC *' command to nickserv would probably be useful for this.

One problem however, is that we would want to get the nickserv response immediately in mod_whitelist's mod_msg handler - but new messages are not polled during a module callback.

One potential solution to this would be to add a "defer" system, possibly using the POSIX getcontext / setcontext functions to yield execution in the mod_msg handler, and return once the main loop receives the next PM.

I haven't fully thought this through yet.

baines avatar Apr 14 '17 20:04 baines

A potentially simpler solution than using the ucontext_t stuff is to use this IRCv3 capability: http://ircv3.net/specs/extensions/account-notify-3.1.html instead of messaging nickserv.

It would certainly not be as powerful as allowing modules to defer themselves until an arbitrary event though.

baines avatar Aug 12 '17 17:08 baines