1
0
mirror of https://github.com/anope/anope.git synced 2026-07-10 16:23:13 +02:00

Fixed crash when certain nicks expire

This commit is contained in:
Adam
2011-04-25 15:58:46 -04:00
parent 4a733c93d4
commit 0cdc628db0
3 changed files with 13 additions and 13 deletions
+10 -11
View File
@@ -138,10 +138,7 @@ class ModuleAsynchCommands : public Module, public Pipe, public AsynchCommandsSe
cm->Destroy();
}
if (current_command == NULL)
this->Reset();
else
this->reset = true;
this->reset = true;
}
EventReturn OnPreCommand(CommandSource &source, Command *command, const std::vector<Anope::string> &params)
@@ -189,10 +186,18 @@ class ModuleAsynchCommands : public Module, public Pipe, public AsynchCommandsSe
else if (cm->destroy)
{
if (cm->started)
{
cm->mutex.Unlock();
continue;
}
else
delete cm;
continue;
}
if (this->reset)
{
this->Reset();
return this->OnNotify();
}
Log(LOG_DEBUG_2) << "Waiting for command thread " << cm->command->name << " from " << cm->source.u->nick;
@@ -220,12 +225,6 @@ class ModuleAsynchCommands : public Module, public Pipe, public AsynchCommandsSe
PopLanguage();
current_command = NULL;
if (this->reset)
{
this->Reset();
return this->OnNotify();
}
}
}
+2 -1
View File
@@ -406,9 +406,10 @@ void expire_chans()
// XXX this is slightly inefficient
void cs_remove_nick(NickCore *nc)
{
for (registered_channel_map::const_iterator it = RegisteredChannelList.begin(), it_end = RegisteredChannelList.end(); it != it_end; ++it)
for (registered_channel_map::const_iterator it = RegisteredChannelList.begin(); it != RegisteredChannelList.end();)
{
ChannelInfo *ci = it->second;
++it;
ChanAccess *access = ci->GetAccess(nc);
if (access)
+1 -1
View File
@@ -243,7 +243,7 @@ int validate_user(User *u)
void expire_nicks()
{
for (nickalias_map::const_iterator it = NickAliasList.begin(), it_end = NickAliasList.end(); it != it_end; )
for (nickalias_map::const_iterator it = NickAliasList.begin(); it != NickAliasList.end();)
{
NickAlias *na = it->second;
++it;