summaryrefslogtreecommitdiff
path: root/src/logger.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-08-28 20:56:45 -0400
committerAdam <Adam@anope.org>2010-08-28 20:56:45 -0400
commite820e1af0d01011dbe9d91d2971cc3518f7f3d42 (patch)
tree9eb52cf891c4cd92ad08ad8d2f7c019780bc6223 /src/logger.cpp
parent26ba944d55fb4ee92dd5d7a3d2cfa869a8be151f (diff)
Properly store our clients internal channel status's and burst them if needed.
Also made Flag::HasFlag use test() instead of operator[] to catch errors, and fixed an out of bounds access to a Flags bitset causing crashes on some systems.
Diffstat (limited to 'src/logger.cpp')
-rw-r--r--src/logger.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/logger.cpp b/src/logger.cpp
index de5e58c32..a5637d4d8 100644
--- a/src/logger.cpp
+++ b/src/logger.cpp
@@ -27,8 +27,12 @@ void InitLogChannels(ServerConfig *config)
if (target[0] == '#')
{
Channel *c = findchan(target);
+ bool created = false;
if (!c)
+ {
c = new Channel(target);
+ created = true;
+ }
c->SetFlag(CH_LOGCHAN);
c->SetFlag(CH_PERSIST);
@@ -38,9 +42,7 @@ void InitLogChannels(ServerConfig *config)
if (bi->HasFlag(BI_CORE) && !c->FindUser(bi))
{
- bi->Join(c);
- for (unsigned j = 0; j < config->BotModeList.size(); ++j)
- c->SetMode(OperServ, config->BotModeList[j], bi->nick, false);
+ bi->Join(c, created);
}
}
}