diff options
author | Adam <Adam@anope.org> | 2013-05-08 20:26:45 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-05-08 20:26:45 -0400 |
commit | 735e234c2c7a984b01295f86045545ed8d9838ce (patch) | |
tree | 87d7cce721eaa7a34d71b17c73f317750d87caef /src/regchannel.cpp | |
parent | 735f0ba6cf5602396bc2cabd6ceca0e92a0edd00 (diff) |
Fixed some issues and desyncs with creating empty permanent channels on startup & dropping empty channels
Diffstat (limited to 'src/regchannel.cpp')
-rw-r--r-- | src/regchannel.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/regchannel.cpp b/src/regchannel.cpp index 12655533b..38246f5dd 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -361,9 +361,16 @@ ChannelInfo::~ChannelInfo() { if (this->bi && this->c->FindUser(this->bi)) this->bi->Part(this->c); + /* Parting the service bot can cause the channel to go away */ + if (this->c) - this->c->ci = NULL; + { + if (this->c && this->c->CheckDelete()) + delete this->c; + + this->c = NULL; + } } RegisteredChannelList->erase(this->name); |