diff options
Diffstat (limited to 'src/modules/m_cloaking.cpp')
-rw-r--r-- | src/modules/m_cloaking.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index c5db9ff8a..eab28db4a 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -375,12 +375,14 @@ class ModuleCloaking : public Module { u->SetMode(cu, false); - if (!IS_LOCAL(u)) + LocalUser* luser = IS_LOCAL(u); + if (!luser) return; + Modes::ChangeList modechangelist; modechangelist.push_remove(&cu); ClientProtocol::Events::Mode modeevent(ServerInstance->FakeClient, NULL, u, modechangelist); - static_cast<LocalUser*>(u)->Send(modeevent); + luser->Send(modeevent); } cu.active = false; } |