]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/postcommand.cpp
Move destruction logic for User and Spanningtree into cull()
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / postcommand.cpp
index d2cea154a2c00e792ae1dd8d082adca235e87361..1b1f618b8a2907d7bd5640322840b64c4d8f3009 100644 (file)
@@ -14,8 +14,6 @@
 /* $ModDesc: Provides a spanning tree server link protocol */
 
 #include "inspircd.h"
-#include "commands/cmd_whois.h"
-#include "commands/cmd_stats.h"
 #include "socket.h"
 #include "xline.h"
 #include "../transport.h"
@@ -68,8 +66,10 @@ void ModuleSpanningTree::OnPostCommand(const std::string &command, const std::ve
        else
        {
                Module* srcmodule = thiscmd->creator;
+               Version ver = srcmodule->GetVersion();
 
-               if (srcmodule && !(srcmodule->GetVersion().Flags & VF_COMMON)) {
+               if (!(ver.Flags & VF_COMMON))
+               {
                        ServerInstance->Logs->Log("m_spanningtree",ERROR,"Routed command %s from non-VF_COMMON module %s",
                                command.c_str(), srcmodule->ModuleSourceFile.c_str());
                        return;