Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: cs_categorize  (Read 3605 times)

0 Members and 1 Guest are viewing this topic.

CrazyCat

  • Anope User
  • Offline Offline
  • Posts: 167
    • French Eggdrop community
cs_categorize
« 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
« Last Edit: October 16, 2013, 08:58:07 AM by CrazyCat »
Logged

Adam

  • Team
  • *
  • Offline Offline
  • Posts: 462
Re: cs_categorize
« Reply #1 on: October 16, 2013, 08:57:06 AM »

Is using 1.9.9 and cs_set_misc an option?
Logged

CrazyCat

  • Anope User
  • Offline Offline
  • Posts: 167
    • French Eggdrop community
Re: cs_categorize
« Reply #2 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.

katsklaw

  • Supporter
  • Anope User
  • Offline Offline
  • Posts: 537
Re: cs_categorize
« Reply #3 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.
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
Re: cs_categorize
« Reply #4 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.
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

CrazyCat

  • Anope User
  • Offline Offline
  • Posts: 167
    • French Eggdrop community
Re: cs_categorize
« Reply #5 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
Pages: [1]   Go Up