Anope IRC Services

Anope Development => Modules => Topic started by: CrazyCat on October 16, 2013, 08:52:30 AM

Title: cs_categorize
Post by: CrazyCat on October 16, 2013, 08:52:30 AM
Hello there,

I'm planning to create a small module (actually called cs_categorize) restricted to ircops to add a category to a chan. So, I've two conceptual questions:
- is it a good idea to alter the chan.db and cs_info table to add it (the category will be added using /msg ChanSer set #channel category zzzzz) or is it better to create a chan_category.db and the corresponding mysql table, or a mix of the two (new .db and alter of mysql existing table) ?
- you'd prefer have a list of possible categories (managed by services admin) or free text ?

Regards

[small edit] I don't know if it's possible to alter the chan.db, so I'm beginning my module using a separate .db and altering the cs_info table, but I can change my way, depending on your answers
Title: Re: cs_categorize
Post by: Adam on October 16, 2013, 08:57:06 AM
Is using 1.9.9 and cs_set_misc an option?
Title: Re: cs_categorize
Post by: CrazyCat on October 16, 2013, 10:18:04 AM
I actually don't use the 1.9 branch, but I'll try it on my development server.
I think it could be a way to do what I want, but I also think about pple who can't easily change their anope version.

BTW, I don't know if cs_set_misc allow to have a list of selectable options... I'll tell more after my tests.
Title: Re: cs_categorize
Post by: katsklaw on October 17, 2013, 06:19:02 AM
Its not a good idea to have 3rd part modules editing core databases. That's a good way to corrupt your chan db.
Title: Re: cs_categorize
Post by: Jan Milants on October 17, 2013, 08:46:17 AM
In 1.8 it s technically impossible to add this to the core DB.
A module that wants to store data persistently has to implement its own DB.
Title: Re: cs_categorize
Post by: CrazyCat on October 21, 2013, 09:12:42 AM
Thanks for your precisions, it was what I thought but a confirmation is better.
I think the category will be a free text entry, only services admin will use this plugin, so they have to know what they do :D