From f657ac6b05b36ccacd69f22e12d77893d90d1c93 Mon Sep 17 00:00:00 2001 From: prozacx Date: Fri, 10 Feb 2006 06:28:51 +0000 Subject: [PATCH] Fixed support for compiling without modules git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@635 726aef4b-f618-498e-8847-2d620e286838 --- Makefile.in | 6 +++--- znc.cpp | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile.in b/Makefile.in index 24d78553..7af934c8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -11,7 +11,7 @@ all: znc @MODTARGET@ depend:: $(CXX) -MM $(CXXFLAGS) $(SRCS) $(INCLUDES) >.depend - (cd modules; $(MAKE) depend) + @if test -n "@MODTARGET@"; then (cd modules; $(MAKE) depend); fi znc: $(OBJS) $(CXX) $(CXXFLAGS) $(INCLUDES) -o $@ $(LIBS) $(OBJS) @@ -21,11 +21,11 @@ znc-static: $(OBJS) strip $@ modules:: - (cd modules; $(MAKE) all) + @if test -n "@MODTARGET@"; then (cd modules; $(MAKE) all); else echo "Modules are not enabled"; fi clean: rm -rf znc znc-static *.o core core.* - (cd modules; $(MAKE) clean) + @if test -n "@MODTARGET@"; then (cd modules; $(MAKE) clean); fi distclean: clean rm -rf Makefile config.log config.status znc-config .depend modules/.depend modules/Makefile diff --git a/znc.cpp b/znc.cpp index 600eb9a7..1cfc815d 100644 --- a/znc.cpp +++ b/znc.cpp @@ -1108,9 +1108,11 @@ bool CZNC::RemVHost(const CString& sHost) { void CZNC::Broadcast(const CString& sMessage, CUser* pUser) { for (map::iterator a = m_msUsers.begin(); a != m_msUsers.end(); a++) { if (a->second != pUser) { - CUser* m_pUser = a->second; // This is a semi-hack because MODULECALLCONT below expects the user to be stored in m_pUser CString sMsg = sMessage; +#ifdef _MODULES + CUser* m_pUser = a->second; // This is a semi-hack because MODULECALLCONT below expects the user to be stored in m_pUser MODULECALLCONT(OnBroadcast(sMsg)); +#endif a->second->PutStatusNotice("*** " + sMsg); } }