i thought i should show you how i add these modes:
Code: Select all
#define FACTION_SUBSCRIBER 'Y'
.....
static long L_UMODE_SUBSCRIBER = 0L;
.....
static Umode *umode_subscriber = NULL;
.....
umode_subscriber = UmodeAdd(modinfo->handle, FACTION_SUBSCRIBER , UMODE_GLOBAL, umode_allow_all, &L_UMODE_SUBSCRIBER);
if (!umode_subscriber)
{
config_error("m_customerchanel: Could not add usermode '%s': %s",FACTION_SUBSCRIBER, ModuleGetErrorStr(modinfo->handle));
MOD_UNLOAD(m_customerchannel)(0);
return MOD_FAILED;
}
As you can see, the module returns FAILED status if something goes wrong. But when i connect to the server, and type /module, it appears on that list; So i assume there are no errors while loading.
But why are then 12 modes missing?
*confused*
[Edit] Ok, it seems that either there is a limitation to a max of 5 usermodes per module OR there is a bug within Unreal, that all usermodes are added succesfully (The var is large enough,
Code: Select all
#define UMODETABLESZ (sizeof(long) * 8)
gets 8*8 = 64. The max nr of umodes possible are 26*26 = 56)
but that unreal only processes the first 32 modes. (Yeah, 32.. odd isnt it?)
I will continue my search for this "bug", would be nice if someone can verify this and search a solution too.
[Edit 2] For some reason, sizeof(long) is 4 instead of 8. I changed it to
and now i can see all modes i added.
But i still can set only the first 32, must be something else somewhere in the /mode function. I'm too tired to continue my search -.-
Maybe someone can find out now what's going on
Thanks