]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cloaking.cpp
Route SVSSILENCE/SVSWATCH using OPT_UCAST, marking them OPTCOMMON
[user/henk/code/inspircd.git] / src / modules / m_cloaking.cpp
index 1f9854a78eeeb6d9da7b6cc969578e4174b81baf..22114c54e7930a5069fe184e29bcc77f45d66d6a 100644 (file)
@@ -332,9 +332,23 @@ class ModuleCloaking : public Module
 
        Version GetVersion()
        {
-               // returns the version number of the module to be
-               // listed in /MODULES
-               return Version("Provides masking of user hostnames", VF_COMMON|VF_VENDOR);
+               std::string testcloak;
+               switch (mode)
+               {
+                       case MODE_COMPAT_HOST:
+                               testcloak = prefix + "-" + Hash->sumIV(compatkey, xtab[0], "*").substr(0,10);
+                               break;
+                       case MODE_COMPAT_IPONLY:
+                               testcloak = Hash->sumIV(compatkey, xtab[0], "*").substr(0,10);
+                               break;
+                       case MODE_HALF_CLOAK:
+                               testcloak = prefix + SegmentCloak("*", 3);
+                               break;
+                       case MODE_OPAQUE:
+                       default:
+                               testcloak = prefix + SegmentCloak("*", 4);
+               }
+               return Version("Provides masking of user hostnames", VF_COMMON|VF_VENDOR, testcloak);
        }
 
        void OnRehash(User* user)