From 31407a3b9e138266bcc1ddb5cffd91bee4f1092c Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 2 Jan 2009 23:26:54 +0000 Subject: ...and make it not go querying modules that dont implement the right interface and cause it to crash :p git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10935 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/main.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/modules/m_spanningtree/main.cpp') diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index dcd02ba9b..511465084 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -728,11 +728,15 @@ void ModuleSpanningTree::RedoConfig(Module* mod, const std::string &name) { /* If m_sha256.so is loaded (we use this for HMAC) or any module implementing a BufferedSocket interface is loaded, * then we need to re-read our config again taking this into account. - * - * We determine if a module supports BufferedSocket simply by sending it the Request for its BufferedSocket name, - * and if it responds non-NULL, it implements the interface. */ - if (name == "m_sha256.so" || BufferedSocketNameRequest((Module*)this, mod).Send() != NULL) + modulelist* ml = ServerInstance->Modules->FindInterface("BufferedSocketHook"); + bool IsBufferSocketModule = false; + + /* Did we find any modules? */ + if (ml && std::find(ml->begin(), ml->end(), mod) != ml->end()) + IsBufferSocketModule = true; + + if (name == "m_sha256.so" || IsBufferSocketModule) { Utils->ReadConfiguration(true); } -- cgit v1.2.3