cooper / juno

a seriously modern IRC daemon written from scratch in Perl. designed to be ridiculously extensible, painlessly reloadable, and excessively configurable
https://juno.mitchellcooper.me
ISC License
15 stars 4 forks source link

Server permissions #123

Open cooper opened 8 years ago

cooper commented 8 years ago

It needs to be possible to give servers enhanced permissions. Still need to consider how this will look in the configuration. Flags in connect block? Classes like for opers? Or something like shared {} in ratbox which matches a mask?

Things that come to mind:

cooper commented 7 years ago

This will use the new connection classes. It will look something like:

[ class: services ]
    priv_flogin
    priv_sasl

It will NOT have allow_servers unless you want it to automatically match servers. For things like services it will not specify, so it will only apply if explicitly set using the class option in the [connect] block.

cooper commented 7 years ago

The user flag methods will be moved to connection.pm so that it can be shared for connections, users, and servers, just like the capab methods. users and servers will alias their methods to them:

return if !$server->has_flag('flogin');
cooper commented 7 years ago

also for S2S protocols the artificial parameter matcher -priv() can be used for server privileges. It will work the same as the existing -oper() matcher for users.

cooper commented 7 years ago

If the matcher fails then a server protocol warning should be produced.

cooper commented 7 years ago

ok, the groundwork for everything mentioned here has been done. still need to add default server class definitions and add -priv() to the commands that should have it