summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-07-05 03:25:25 +0200
committerattilamolnar <attilamolnar@hush.com>2012-07-13 17:20:39 +0200
commit5d8b4bfa59cecfed1f503dacf6ef2f5dc8cb7f2d (patch)
tree6cdc52847a9fd01e6acc4093e345fe75ea5d7866 /src/modules
parent3f11cf21b155957d4b0321f932a85ec6556f6116 (diff)
m_ident Fix casting User pointers to LocalUser pointers blindly
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_ident.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp
index 163487f70..c30e4d200 100644
--- a/src/modules/m_ident.cpp
+++ b/src/modules/m_ident.cpp
@@ -383,7 +383,11 @@ class ModuleIdent : public Module
{
/* Module unloading, tidy up users */
if (target_type == TYPE_USER)
- OnUserDisconnect((LocalUser*)item);
+ {
+ LocalUser* user = IS_LOCAL((User*) item);
+ if (user)
+ OnUserDisconnect(user);
+ }
}
virtual void OnUserDisconnect(LocalUser *user)