1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-10 19:23:12 +02:00

Fix (just created) bug in extcmode unloading (with param).

Update slot/param mapping. Now unloading should work well...
otherwise it crashed after destroying the channel.
This commit is contained in:
Bram Matthys
2019-06-29 09:51:23 +02:00
parent bbbdba1083
commit 375b03c132
+10
View File
@@ -141,6 +141,15 @@ void extcmode_para_addslot(Cmode *c, int slot)
param_to_slot_mapping[c->flag] = slot;
}
/* Update letter->slot mapping and slot->handler mapping */
void extcmode_para_delslot(Cmode *c, int slot)
{
if ((slot < 0) || (slot > MAXPARAMMODES))
abort();
ParamTable[slot] = NULL;
param_to_slot_mapping[c->flag] = 0;
}
Cmode *CmodeAdd(Module *module, CmodeInfo req, Cmode_t *mode)
{
short i = 0, j = 0;
@@ -298,6 +307,7 @@ void unload_extcmode_commit(Cmode *cmode)
}
cmode->flag = '\0';
extcmode_para_delslot(cmode, cmode->slot);
}
void CmodeDel(Cmode *cmode)