summaryrefslogtreecommitdiff
path: root/src/bots.cpp
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-06-03 20:29:33 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-06-03 20:29:33 +0000
commit426f72117b4557b2d348eddcb2e89e90eff77270 (patch)
tree8a91b658d4313ead66e9d94f9297d5b2efb5fcb3 /src/bots.cpp
parentaffc29aca56d8777966f0a5a3b3a01dd5d3dffb2 (diff)
Fix bug #1080, changing core pseudo-client nicks in the config should register the change when the bots are brought back online, patch from Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2310 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/bots.cpp')
-rw-r--r--src/bots.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/bots.cpp b/src/bots.cpp
index 095d16167..a46726122 100644
--- a/src/bots.cpp
+++ b/src/bots.cpp
@@ -20,6 +20,21 @@ BotInfo::BotInfo(const char *nnick)
insert_bot(this); // XXX, this is ugly, but it needs to stay until hashing of bots is redone in STL.
nbots++;
this->cmdTable = NULL;
+
+ if (s_ChanServ && !stricmp(s_ChanServ, nnick))
+ this->flags |= BI_CHANSERV;
+ else if (s_BotServ && !stricmp(s_BotServ, nnick))
+ this->flags |= BI_BOTSERV;
+ else if (s_HostServ && !stricmp(s_BotServ, nnick))
+ this->flags |= BI_HOSTSERV;
+ else if (s_OperServ && !stricmp(s_OperServ, nnick))
+ this->flags |= BI_OPERSERV;
+ else if (s_MemoServ && !stricmp(s_MemoServ, nnick))
+ this->flags |= BI_MEMOSERV;
+ else if (s_NickServ && !stricmp(s_NickServ, nnick))
+ this->flags |= BI_NICKSERV;
+ else if (s_GlobalNoticer && !stricmp(s_GlobalNoticer, nnick))
+ this->flags |= BI_GLOBAL;
}
BotInfo::BotInfo(const char *nnick, const char *nuser, const char *nhost, const char *nreal)
@@ -33,6 +48,21 @@ BotInfo::BotInfo(const char *nnick, const char *nuser, const char *nhost, const
insert_bot(this); // XXX, this is ugly, but it needs to stay until hashing of bots is redone in STL.
nbots++;
this->cmdTable = NULL;
+
+ if (s_ChanServ && !stricmp(s_ChanServ, nnick))
+ this->flags |= BI_CHANSERV;
+ else if (s_BotServ && !stricmp(s_BotServ, nnick))
+ this->flags |= BI_BOTSERV;
+ else if (s_HostServ && !stricmp(s_BotServ, nnick))
+ this->flags |= BI_HOSTSERV;
+ else if (s_OperServ && !stricmp(s_OperServ, nnick))
+ this->flags |= BI_OPERSERV;
+ else if (s_MemoServ && !stricmp(s_MemoServ, nnick))
+ this->flags |= BI_MEMOSERV;
+ else if (s_NickServ && !stricmp(s_NickServ, nnick))
+ this->flags |= BI_NICKSERV;
+ else if (s_GlobalNoticer && !stricmp(s_GlobalNoticer, nnick))
+ this->flags |= BI_GLOBAL;
}
BotInfo::~BotInfo()