View Issue Details

IDProjectCategoryView StatusLast Update
0001315unrealircdpublic2003-10-24 15:07
ReporterAngryWolf Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionopen 
Product Version3.2-beta18 
Summary0001315: Statically linked modules & HOOKTYPE_CONFIG*
DescriptionOnce codemastr told me that somehow under Windows modules don't want to load dinamically. Because of this modules are required to be linked statically. That's OK, but the problem comes when such modules attempt to use HOOKTYPE_CONFIGTEST, HOOKTYPE_CONFIGRUN and/or HOOKTYPE_CONFIGPOSTTEST. These type of hooks are never run, because the owners of them never have MODFLAG_TESTING. Therefore static modules can't define their own configuration items. Could this problem be solved?
3rd party modules

Activities

codemastr

2003-10-24 03:35

reporter   ~0003847

Seems to work fine for me... Try yourself, add
set { htm { incoming-rate 500; }; };
then do a /stats S and it should show it as 500.

And I have no idea what you're talking about with MODFLAG_TESTING, in a static linking environment, there are no module objects, therefore there is nothing to set MODFLAG_TESTING on! But, if you look in src/ircd.c you'll see:
#ifdef STATIC_LINKING
        {
                ModuleInfo ModCoreInfo;
                ModCoreInfo.size = sizeof(ModuleInfo);
                ModCoreInfo.module_load = 0;
                ModCoreInfo.handle = NULL;
                l_commands_Test(&ModCoreInfo);
        }
#endif

Which means that the testing functions are called, and therefore the hooks should be run.

The only difference is, under Windows you are _required_ to have a HOOKTYPE_REHASH if you have config stuff. It is recommended that you have that on *nix as well, but it isn't required.

AngryWolf

2003-10-24 07:01

reporter   ~0003848

Last edited: 2003-10-24 12:32

Oh, it's my fault. I still have to learn a lot of things about Unreal. Sorry for disturbing, please, delete this bugreport. (Btw, I've already had a knowledge about the necessity of HOOKTYPE_REHASH.)

edited on: 10-24-03 12:32

AngryWolf

2003-10-24 14:12

reporter   ~0003853

Is there a place where I can get help/support on module coding? I've been banned from #unreal-support since July 2003 and have no idea how and where I could ask one or two questions if I need information...

syzop

2003-10-24 15:07

administrator   ~0003858

Well, no.. For now it's just RTFS (read the f.. source).. as you know there's some limited documentation on http://modules.unrealircd.com/ but for real, interactive or not, help there's no such place AFAIK. Also you should understand that not every coder is interrested in helping module coders with their problems, as you know I certainly do not like that (IMO they should read the source, ircds are complicated programs and you will have questions/problems all the time), probably the only one that might help you is codemastr :p.

Issue History

Date Modified Username Field Change
2003-10-23 20:06 AngryWolf New Issue
2003-10-24 03:35 codemastr Note Added: 0003847
2003-10-24 07:01 AngryWolf Note Added: 0003848
2003-10-24 12:32 AngryWolf Note Edited: 0003848
2003-10-24 14:12 AngryWolf Note Added: 0003853
2003-10-24 15:07 syzop Status new => closed
2003-10-24 15:07 syzop Note Added: 0003858