Development > Coding and development discussion

Settings & settings-module

(1/1)

MatHack:
Since some modules use settings already (latest SVN, rightsmanagement & online), and more and more modules will later on (seeing the colors in settings ToDo-item), it is a good idea in my opinion to make the Settings.php module a core-module, move the get_setting function from rightsmanagement to settings and make sure all settings are requested & managed through that module.

This way you will have less redundant functions and if there's need to change a _setting function you only have to change it on 1 location.

Just my 2 cents.

Alreadythere:
You're right there.
Actually the current situation is in some way my fault. I added the get/set_setting functions to my bot class, as I got tired of doing the selects all the time. Later I added a settings module that allowed to read and modify some settings online.
And all the while in between I posted modules I wrote, which are using the functions (I'm too lazy to remove them tbh).

Best solution would be all in one Settings core module, similar to the colors module. I'll try to write something soon.

MatHack:
There shouldn't be any need for a color module after putting them in settings, right?

Alreadythere:
Actually the idea is to have a color and a setting module. Settings are bot specific, color values can be global over more then one bot.

Me putting all those color values into the settings table was a quick fix. I wanted them in some table, so I put them in the first semi-related one.

Navigation

[0] Message Index

Go to full version