From 6a997236cf5ed6bc5aaa0263183b1c90ec2e7191 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 4 Dec 2005 21:14:13 +0000 Subject: Fixed to not break with m_spanningtree git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2174 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_conn_lusers.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/modules') diff --git a/src/modules/m_conn_lusers.cpp b/src/modules/m_conn_lusers.cpp index c0106566a..7bf2013e1 100644 --- a/src/modules/m_conn_lusers.cpp +++ b/src/modules/m_conn_lusers.cpp @@ -49,7 +49,21 @@ class ModuleConnLUSERS : public Module virtual void OnUserConnect(userrec* user) { - Srv->CallCommandHandler("LUSERS", NULL, 0, user); + // if we're using a protocol module, we cant just call + // the command handler because the protocol module + // has hooked it. We must call OnPreCommand in the + // protocol module. Yes, at some point there will + // be a way to get the current protocol module's name + // from the core and probably a pointer to its class. + Module* Proto = FindModule("m_spanningtree.so"); + if (Proto) + { + Proto->OnPreCommand("LUSERS", NULL, 0, user) + } + else + { + Srv->CallCommandHandler("LUSERS", NULL, 0, user); + } } }; -- cgit v1.3.1-10-gc9f91