Modules hooks: FLUSHDB event example.

This commit is contained in:
antirez
2019-10-23 10:37:04 +02:00
parent ed833c9f99
commit bc1ef48e56
2 changed files with 29 additions and 0 deletions

View File

@ -5870,6 +5870,8 @@ void moduleFireServerEvent(uint64_t eid, int subid, void *data) {
modulePopulateClientInfoStructure(&civ1,data,
el->event.dataver);
moduledata = &civ1;
} else if (eid == REDISMODULE_EVENT_FLUSHDB) {
moduledata = data;
}
el->callback(&ctx,el->event,subid,moduledata);
moduleFreeContext(&ctx);