summaryrefslogtreecommitdiff
path: root/src/modules/m_blockamsg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_blockamsg.cpp')
-rw-r--r--src/modules/m_blockamsg.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp
index 0472e2417..fd28625d2 100644
--- a/src/modules/m_blockamsg.cpp
+++ b/src/modules/m_blockamsg.cpp
@@ -126,7 +126,8 @@ public:
userchans++;
// Check that this message wasn't already sent within a few seconds.
- BlockedMessage* m = (BlockedMessage*)user->GetExt("amsgblock");
+ BlockedMessage* m;
+ user->GetExt("amsgblock", m);
// If the message is identical and within the time.
// We check the target is *not* identical, that'd straying into the realms of flood control. Which isn't what we're doing...
@@ -168,7 +169,8 @@ public:
if(target_type == TYPE_USER)
{
userrec* user = (userrec*)item;
- BlockedMessage* m = (BlockedMessage*)user->GetExt("amsgblock");
+ BlockedMessage* m;
+ user->GetExt("amsgblock", m);
if(m)
{
DELETE(m);