]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_blockamsg.cpp
XHTML 1.1 spec validation and charset
[user/henk/code/inspircd.git] / src / modules / m_blockamsg.cpp
index 0472e2417efbbeac8d3bafffe6a718eb001b82c1..24b3deb85ddfc6acd81ffa2cec6ca8be2bf4becd 100644 (file)
@@ -32,7 +32,7 @@ extern time_t TIME;
 
 enum BlockAction { IBLOCK_KILL, IBLOCK_KILLOPERS, IBLOCK_NOTICE, IBLOCK_NOTICEOPERS, IBLOCK_SILENT };
 
-class BlockedMessage
+class BlockedMessage : public classbase
 {
 public:
        std::string message;
@@ -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);