0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-04 06:38:58 +02:00

Announce changed capabilities on module load

Closes #165
This commit is contained in:
Elizabeth Myers 2016-04-04 02:30:00 -05:00
parent 5eb3d7a7c0
commit 3256156aca

View file

@ -763,7 +763,11 @@ unload_one_module(const char *name, bool warn)
continue;
}
capability_orphan(idx, m->cap_name);
if (m->cap_id != NULL)
{
capability_orphan(idx, m->cap_name);
sendto_local_clients_with_capability(CLICAP_CAP_NOTIFY, ":%s CAP * DEL :%s", me.name, m->cap_name);
}
}
}
}
@ -976,7 +980,10 @@ load_a_module(const char *path, bool warn, int origin, bool core)
result = capability_put(idx, m->cap_name, m->cap_ownerdata);
if (m->cap_id != NULL)
{
*(m->cap_id) = result;
sendto_local_clients_with_capability(CLICAP_CAP_NOTIFY, ":%s CAP * ADD :%s", me.name, m->cap_name);
}
}
}
}