1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 19:26:40 +02:00

Initialize botinfo->flags on bot creation to fix some database problems

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2381 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
adam-
2009-07-16 09:01:01 +00:00
parent 17a09abb6d
commit 81d05eb8a7
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -20,6 +20,7 @@ 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;
this->flags = 0;
if (s_ChanServ && !stricmp(s_ChanServ, nnick))
this->flags |= BI_CHANSERV;
@@ -48,6 +49,7 @@ 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;
this->flags = 0;
if (s_ChanServ && !stricmp(s_ChanServ, nnick))
this->flags |= BI_CHANSERV;
+1 -1
View File
@@ -507,7 +507,7 @@ void load_bs_dbase()
SAFE(read_string(&bi->real, f));
if (ver >= 10) {
SAFE(read_int16(&tmp16, f));
bi->flags = tmp16;
bi->flags |= tmp16;
}
SAFE(read_int32(&tmp32, f));
bi->created = tmp32;