olagood / drastikbot_modules

Modules for drastikbot
0 stars 5 forks source link

Module: Backup #3

Open olagood opened 6 years ago

olagood commented 6 years ago

Module Filename: backup.py

Automatically enable/disable blacklisted modules when the bot that already provides the module's functionality quits, parts/joins.

It should provide an interface for configuration to authenticated (using grid.py) owners.

ghost commented 4 years ago

With grid.py being deprecated, has anything in this issue changed other than the way the bot sees who its owners are?

olagood commented 4 years ago

grid.py used to provide an interface for registering owners and administrators in the bots database (with a password for authentication). This mechanism was not ported to the admin.py module. Now authentication is done automatically through NickServ and the owners list in the config file. This module is in the deprecated folder in case someone needs to use drastikbot on a server without NickServ, but it is probably broken due to changes of some internal bot functions.

It should provide an interface for configuration to authenticated (using grid.py) owners.

This basically means that the module will have some commands to set/unset which bots provide which modules. You would use some functions provided by grid.py to ensure that a user is allowed to use those commands.

The way to do this now would be using a function like this: https://github.com/olagood/drastikbot/blob/d38b797042c786d0bb3bfebaef5f0051f1c353d8/src/irc/modules/admin.py#L66 In fact i think that you can import this function directly to your module since admin.py is always loaded by drastikbot: from admin import is_allowed