summaryrefslogtreecommitdiff
path: root/src/bots.cpp
diff options
context:
space:
mode:
authorNaram Qashat <cyberbotx@cyberbotx.com>2010-06-20 18:42:58 -0400
committerNaram Qashat <cyberbotx@cyberbotx.com>2010-06-20 18:42:58 -0400
commit381c9c8870fad4c544f29deec22ba4be3549a731 (patch)
treef5f26e2dd380910b0ddd26e3d885d6bf56d40181 /src/bots.cpp
parent2528dc80bd1b3e6b2c09db23eb51659e30128110 (diff)
The first of a few "CBX OCDing over code style" commits, focusing on include/* and src/* but not src/core/* or src/modules/*.
Diffstat (limited to 'src/bots.cpp')
-rw-r--r--src/bots.cpp23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/bots.cpp b/src/bots.cpp
index e9021b188..424120d2d 100644
--- a/src/bots.cpp
+++ b/src/bots.cpp
@@ -3,9 +3,6 @@
* Copyright (C) 2008-2010 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
- *
- *
- *
*/
#include "services.h"
@@ -35,33 +32,19 @@ BotInfo::BotInfo(const std::string &nnick, const std::string &nuser, const std::
ci::string ci_nick(nnick.c_str());
if (Config.s_ChanServ && ci_nick == Config.s_ChanServ)
- {
ChanServ = this;
- }
else if (Config.s_BotServ && ci_nick == Config.s_BotServ)
- {
BotServ = this;
- }
else if (Config.s_HostServ && ci_nick == Config.s_HostServ)
- {
HostServ = this;
- }
else if (Config.s_OperServ && ci_nick == Config.s_OperServ)
- {
OperServ = this;
- }
else if (Config.s_MemoServ && ci_nick == Config.s_MemoServ)
- {
MemoServ = this;
- }
else if (Config.s_NickServ && ci_nick == Config.s_NickServ)
- {
NickServ = this;
- }
else if (Config.s_GlobalNoticer && ci_nick == Config.s_GlobalNoticer)
- {
Global = this;
- }
BotListByNick[this->nick.c_str()] = this;
if (!this->uid.empty())
@@ -78,14 +61,12 @@ BotInfo::BotInfo(const std::string &nnick, const std::string &nuser, const std::
BotInfo::~BotInfo()
{
- for (registered_channel_map::const_iterator it = RegisteredChannelList.begin(); it != RegisteredChannelList.end(); ++it)
+ for (registered_channel_map::const_iterator it = RegisteredChannelList.begin(), it_end = RegisteredChannelList.end(); it != it_end; ++it)
{
ChannelInfo *ci = it->second;
if (ci->bi == this)
- {
ci->bi = NULL;
- }
}
BotListByNick.erase(this->nick.c_str());
@@ -105,7 +86,7 @@ void BotInfo::ChangeNick(const char *newnick)
void BotInfo::RejoinAll()
{
- for (registered_channel_map::const_iterator it = RegisteredChannelList.begin(); it != RegisteredChannelList.end(); ++it)
+ for (registered_channel_map::const_iterator it = RegisteredChannelList.begin(), it_end = RegisteredChannelList.end(); it != it_end; ++it)
{
ChannelInfo *ci = it->second;