summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_cloaking.cpp30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp
index 0405e31dd..56a2f5d43 100644
--- a/src/modules/m_cloaking.cpp
+++ b/src/modules/m_cloaking.cpp
@@ -336,21 +336,23 @@ class ModuleCloaking : public Module
Version GetVersion()
{
- std::string testcloak;
- switch (mode)
+ std::string testcloak = "broken";
+ if (Hash)
{
- 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);
+ 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:
+ testcloak = prefix + SegmentCloak("*", 4);
+ }
}
return Version("Provides masking of user hostnames", VF_COMMON|VF_VENDOR, testcloak);
}