void OnChannelSync(Channel *c) override { if (!c->ci || !mlocks) return; if (use_server_side_mlock && Servers::Capab.count("MLOCK") > 0) { Anope::string modes = mlocks->GetMLockAsString(c->ci, false).replace_all_cs("+", "").replace_all_cs("-", ""); Uplink::Send(Me, "MLOCK", c->creation_time, c->ci->GetName(), modes); } }
EventReturn OnUnMLock(ChanServ::Channel *ci, ModeLock *lock) override { if (!mlocks) return EVENT_CONTINUE; ChannelMode *cm = ModeManager::FindChannelModeByName(lock->GetName()); if (use_server_side_mlock && cm && ci->c && (cm->type == MODE_REGULAR || cm->type == MODE_PARAM) && Servers::Capab.count("MLOCK") > 0) { Anope::string modes = mlocks->GetMLockAsString(ci, false).replace_all_cs("+", "").replace_all_cs("-", "").replace_all_cs(cm->mchar, ""); Uplink::Send(Me, "MLOCK", ci->c->creation_time, ci->GetName(), modes); } return EVENT_CONTINUE; }