View Issue Details

IDProjectCategoryView StatusLast Update
0003730unrealmodule apipublic2008-12-10 09:37
ReporterZell Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version3.2.7 
Summary0003730: Permanent Modules Not Permanent
Descriptionmaybe i'm doing something wrong and if so correct me.

I have loaded my own custom modules (and to verify its a real bug, some from the Unreal website) that contain the directive ModuleSetOptions(modinfo->handle, MOD_OPT_PERM);

And those modules are NOT marked "[PERM]" in the /module list, and the ircd treats them as temp (reloads on rehash, and are removable by deleting their loadmodule and rehashing)
Steps To ReproduceAdd perm module to config
Rehash
Del perm module from config
Rehash
3rd party modules(own module): m_ssloper // (unreal official module) m_soper

Activities

Zell

2008-09-01 18:51

reporter   ~0015398

*EDIT Original Report*

Okay, I found the issue. It is a combination of my mistake and how the ModuleSetOptions works. I was attempting to set my module as "Official" so it didn't set the tainted flag (3), and ModuleSetOptions clears previous modopts and sets the new one so:

ModuleSetOptions(modinfo->handle, MOD_OPT_PERM);
followed by
ModuleSetOptions(modinfo->handle, MOD_OPT_OFFICIAL);

results in Official being set, and Permanent being unset.

Maybe the ModuleSetOptions could be changed to OR in the new options (instead of using the = operator to simply overwrite them)?

syzop

2008-12-10 09:37

administrator   ~0015437

Good you found the cause ;)

I understand it could be a tad confusing, if any.. it should be better documented I guess...

I do unset module options sometimes, so making it OR is not really an option. I, fe, sometimes unset the PERM flag if a certain command is executed so people can unload/reload my modules...

Issue History

Date Modified Username Field Change
2008-09-01 18:21 Zell New Issue
2008-09-01 18:21 Zell 3rd party modules => (own module): m_ssloper // (unreal official module) m_soper
2008-09-01 18:51 Zell Note Added: 0015398
2008-12-10 09:37 syzop QA => Not touched yet by developer
2008-12-10 09:37 syzop U4: Need for upstream patch => No need for upstream InspIRCd patch
2008-12-10 09:37 syzop Status new => closed
2008-12-10 09:37 syzop Note Added: 0015437
2008-12-10 09:37 syzop Resolution open => no change required
2017-01-06 15:48 syzop Category module => module api