diff options
| author | Adam <Adam@anope.org> | 2010-08-15 14:08:05 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2010-08-15 14:08:05 -0400 |
| commit | c2a97d9f3f2d56d889875f9b60d1e2cbc9826d15 (patch) | |
| tree | 5530abf6bdb54f8c32b1f681f6367536a412e262 /src/chanserv.cpp | |
| parent | a950ed8cabfeca55c909f02412b1788bd386dcff (diff) | |
Cleanup of various different crashes/inconsistancies
Diffstat (limited to 'src/chanserv.cpp')
| -rw-r--r-- | src/chanserv.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/chanserv.cpp b/src/chanserv.cpp index 2027303fb..b0d6f4b16 100644 --- a/src/chanserv.cpp +++ b/src/chanserv.cpp @@ -967,6 +967,7 @@ ChanServTimer::ChanServTimer(Channel *chan) : Timer(Config.CSInhabit), c(chan) { if (c->ci) c->ci->SetFlag(CI_INHABIT); + ChanServ->Join(c); } void ChanServTimer::Tick(time_t) @@ -976,13 +977,7 @@ void ChanServTimer::Tick(time_t) c->ci->UnsetFlag(CI_INHABIT); - /* If the channel has users again, don't part it and halt */ - if (!c->users.empty()) - return; - - ChanServ->Part(c); - - /* Now delete the channel as it is empty */ - if (!c->HasFlag(CH_PERSIST) && !c->ci->HasFlag(CI_PERSIST)) - delete c; + if (c->users.size() == 1 || c->ci->bi != ChanServ) + ChanServ->Part(c); } + |
