saving irc splits now

This commit is contained in:
fourtf
2019-09-11 00:10:49 +02:00
parent c4d0efacff
commit 2a8c5e654f
2 changed files with 22 additions and 2 deletions
+3 -2
View File
@@ -158,14 +158,15 @@ Irc &Irc::getInstance()
int Irc::uniqueId()
{
/// XXX: also check for channels
int i = this->currentId_ + 1;
auto it = this->servers_.find(i);
auto it2 = this->abandonedChannels_.find(i);
while (it != this->servers_.end())
while (it != this->servers_.end() || it2 != this->abandonedChannels_.end())
{
i++;
it = this->servers_.find(i);
it2 = this->abandonedChannels_.find(i);
}
return (this->currentId_ = i);