mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 11:09:04 -04:00
Clean up some log messages
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11917 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
f3e45bfb0e
commit
64362e2fcd
@ -10,7 +10,7 @@ CC = @CC@
|
||||
SYSTEM = @SYSTEM@
|
||||
BUILDPATH = @BUILD_DIR@
|
||||
SOCKETENGINE = @SOCKETENGINE@
|
||||
CXXFLAGS += -pipe -fPIC -DPIC
|
||||
CXXFLAGS = -O1 -pipe -fPIC -DPIC
|
||||
LDLIBS = -pthread -lstdc++
|
||||
LDFLAGS =
|
||||
SHARED = -shared -rdynamic
|
||||
|
@ -20,8 +20,7 @@
|
||||
classbase::classbase()
|
||||
{
|
||||
if (ServerInstance && ServerInstance->Logs)
|
||||
ServerInstance->Logs->Log("CULLLIST", DEBUG, "classbase::+%s @%p",
|
||||
typeid(*this).name(), (void*)this);
|
||||
ServerInstance->Logs->Log("CULLLIST", DEBUG, "classbase::+ @%p", (void*)this);
|
||||
}
|
||||
|
||||
CullResult classbase::cull()
|
||||
@ -35,8 +34,7 @@ CullResult classbase::cull()
|
||||
classbase::~classbase()
|
||||
{
|
||||
if (ServerInstance && ServerInstance->Logs)
|
||||
ServerInstance->Logs->Log("CULLLIST", DEBUG, "classbase::~%s @%p",
|
||||
typeid(*this).name(), (void*)this);
|
||||
ServerInstance->Logs->Log("CULLLIST", DEBUG, "classbase::~ @%p", (void*)this);
|
||||
}
|
||||
|
||||
CullResult::CullResult()
|
||||
|
@ -111,6 +111,7 @@ void InspIRCd::Cleanup()
|
||||
|
||||
/* Delete objects dynamically allocated in constructor (destructor would be more appropriate, but we're likely exiting) */
|
||||
/* Must be deleted before modes as it decrements modelines */
|
||||
FakeClient->cull();
|
||||
DeleteZero(this->FakeClient);
|
||||
DeleteZero(this->Users);
|
||||
DeleteZero(this->Modes);
|
||||
|
@ -63,7 +63,7 @@ CullResult ModeHandler::cull()
|
||||
ModeHandler::~ModeHandler()
|
||||
{
|
||||
if (ServerInstance && ServerInstance->Modes && ServerInstance->Modes->FindMode(mode, m_type) == this)
|
||||
ServerInstance->Logs->Log("MODE", DEBUG, "ERROR: Destructor for mode %c called while not culled", mode);
|
||||
ServerInstance->Logs->Log("MODE", ERROR, "ERROR: Destructor for mode %c called while still registered", mode);
|
||||
}
|
||||
|
||||
bool ModeHandler::IsListMode()
|
||||
|
@ -476,6 +476,16 @@ void ModuleManager::DoSafeUnload(Module* mod)
|
||||
mod->OnCleanup(TYPE_USER,u->second);
|
||||
u->second->doUnhookExtensions(items);
|
||||
}
|
||||
for(char m='A'; m < 'z'; m++)
|
||||
{
|
||||
ModeHandler* mh;
|
||||
mh = ServerInstance->Modes->FindMode(m, MODETYPE_USER);
|
||||
if (mh && mh->creator == mod)
|
||||
ServerInstance->Modes->DelMode(mh);
|
||||
mh = ServerInstance->Modes->FindMode(m, MODETYPE_CHANNEL);
|
||||
if (mh && mh->creator == mod)
|
||||
ServerInstance->Modes->DelMode(mh);
|
||||
}
|
||||
|
||||
/* Tidy up any dangling resolvers */
|
||||
ServerInstance->Res->CleanResolvers(mod);
|
||||
@ -607,8 +617,7 @@ void ModuleManager::UnloadAll()
|
||||
std::map<std::string, Module*>::iterator me = i++;
|
||||
if (CanUnload(me->second))
|
||||
{
|
||||
ServerInstance->GlobalCulls.AddItem(me->second);
|
||||
Modules.erase(me);
|
||||
DoSafeUnload(me->second);
|
||||
}
|
||||
}
|
||||
ServerInstance->GlobalCulls.Apply();
|
||||
|
Loading…
x
Reference in New Issue
Block a user