X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_cloaking.cpp;h=0aee306a341f798f66900c180839ce940d038f34;hb=e80a1296a096ff2c495b3cd2a3913d5e5f6ec450;hp=381a2dc4009c76f5f753b1a4321747e50146db72;hpb=df0bdf390862226c1a8a404d9a154133ce2e0bde;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 381a2dc40..0aee306a3 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -133,7 +133,7 @@ class ModuleCloaking : public Module throw ModuleException("Could not add new modes!"); ServerInstance->Modules->UseInterface("HashRequest"); - Extensible::Register(&cu.ext); + ServerInstance->Extensions.Register(&cu.ext); Implementation eventlist[] = { I_OnRehash, I_OnCheckBan, I_OnUserConnect }; ServerInstance->Modules->Attach(eventlist, this, 3); @@ -244,7 +244,7 @@ class ModuleCloaking : public Module } else { - const char* ip4 = (const char*)&ip.in4.sin_addr; + const unsigned char* ip4 = (const unsigned char*)&ip.in4.sin_addr; snprintf(rv, 50, ".%d.%d.IP", ip4[1], ip4[0]); } return rv; @@ -476,7 +476,7 @@ class ModuleCloaking : public Module } case MODE_OPAQUE: default: - chost = SegmentIP(dest->client_sa); + chost = prefix + SegmentIP(dest->client_sa); } cu.ext.set(dest,chost); }