From 9941a616cbba8ad5dec07bdf908a1d08d81e568e Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 10 Jul 2006 16:51:19 +0000 Subject: If you ask me, it looks a hell of a lot tidier without forcing the cast. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4277 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_banexception.cpp | 3 ++- src/modules/m_blockamsg.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp index ba3a1b38a..ef8dc4d91 100644 --- a/src/modules/m_banexception.cpp +++ b/src/modules/m_banexception.cpp @@ -54,7 +54,8 @@ public: { if(chan != NULL) { - modelist* list = (modelist*)chan->GetExt(be->GetInfoKey()); + modelist* list; + chan->GetExt(be->GetInfoKey(), list); Srv->Log(DEBUG, std::string(user->nick)+" is trying to join "+std::string(chan->name)+", checking for ban exceptions"); if(list) 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); -- cgit v1.2.3