summaryrefslogtreecommitdiff
path: root/src/modules/m_cloaking.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_cloaking.cpp')
-rw-r--r--src/modules/m_cloaking.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp
index 3c057aabc..6163b41b7 100644
--- a/src/modules/m_cloaking.cpp
+++ b/src/modules/m_cloaking.cpp
@@ -105,11 +105,12 @@ class CloakUser : public ModeHandler
/* Force creation of missing cloak */
Sender->OnUserConnect(dest);
}
-
- dest->GetExt("cloaked_host", cloak);
- dest->ChangeDisplayedHost(cloak->c_str());
- dest->SetMode('x',true);
- return MODEACTION_ALLOW;
+ if (dest->GetExt("cloaked_host", cloak))
+ {
+ dest->ChangeDisplayedHost(cloak->c_str());
+ dest->SetMode('x',true);
+ return MODEACTION_ALLOW;
+ }
}
}
else