+ Implementation eventlist[] = { I_OnRequest, I_OnRehash, I_OnPreCommand, I_OnLoadModule };
+ ServerInstance->Modules->Attach(eventlist, this, 3);
+ }
+
+ bool OneOfMatches(const char* host, const char* ip, const char* hostlist)
+ {
+ std::stringstream hl(hostlist);
+ std::string xhost;
+ while (hl >> xhost)
+ {
+ if (InspIRCd::Match(host, xhost, ascii_case_insensitive_map) || InspIRCd::MatchCIDR(ip, xhost, ascii_case_insensitive_map))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ virtual void OnLoadModule(Module* mod, const std::string& name)
+ {
+ if (ServerInstance->Modules->ModuleHasInterface(mod, "HashRequest"))
+ {
+ ServerInstance->Logs->Log("m_sqloper",DEBUG, "Post-load registering hasher: %s", name.c_str());
+ std::string sname = HashNameRequest(this, mod).Send();
+ hashers[sname.c_str()] = mod;
+ names.push_back(sname);
+ if (!diduseiface)
+ {
+ ServerInstance->Modules->UseInterface("HashRequest");
+ diduseiface = true;
+ }
+ }